]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
- paths thing on ftpadmdir
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 30 Jun 2009 03:47:46 +0000 (03:47 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Tue, 30 Jun 2009 03:47:46 +0000 (03:47 +0000)
Changed files:
    modules/cmds.py -> 1.14
    modules/common.py -> 1.11

modules/cmds.py
modules/common.py

index 580fa444a2aaf8db03f5d0b32cbd672bb1fb1f56..76a413bad65ccb6a49c0e1abe8508e33d3abddbd 100644 (file)
@@ -81,19 +81,19 @@ def load_creds():
     global users, cookies
     users={}
     cookies={}
-    if not common.fileexists(common.ftpadmdir+'var/passwd'):
+    if not common.fileexists(common.ftpadmdir+'/var/passwd'):
         return
     else:
-        f=open(common.ftpadmdir+'var/passwd', 'r')
+        f=open(common.ftpadmdir+'/var/passwd', 'r')
         for line in f.xreadlines():
             x=line.strip().split(':')
             if len(x)>=2:
                 users[x[0]]=x[1]
         f.close()
-    if not common.fileexists(common.ftpadmdir+'var/cookies'):
+    if not common.fileexists(common.ftpadmdir+'/var/cookies'):
         return
     else:
-        f=open(common.ftpadmdir+'var/cookies', 'r')
+        f=open(common.ftpadmdir+'/var/cookies', 'r')
         for line in f.xreadlines():
             x=line.strip().split(':')
             if len(x)>=2:
@@ -101,7 +101,7 @@ def load_creds():
         f.close()
 
 def write_cookies():
-    f=open(common.ftpadmdir+'var/cookies', 'w')
+    f=open(common.ftpadmdir+'/var/cookies', 'w')
     for key in cookies.keys():
         f.write('%s:%s\n' % (key, cookies[key]))
     f.close()
@@ -178,7 +178,7 @@ cmdlist_noargs={'lout':cmd_logout, 'gett':cmd_gettree, 'slck':cmd_show_locks}
 
 BailOut="BailOut"
 locks={}
-logfile=open(common.ftpadmdir+'var/log', 'a')
+logfile=open(common.ftpadmdir+'/var/log', 'a')
 load_creds()
 reloadftptree()
 salt=md5.new(`time.time()`).hexdigest()
index 945117ec9f943338c2e5593136de03e75a38cb04..19f3aa8949e3c09076ec72d554ec46f763b6dd5d 100644 (file)
@@ -15,12 +15,12 @@ def checkdir(dir):
         sys.exit(1)
 
 if 'HOME' in os.environ:
-    ftpadmdir = os.environ['HOME'] + '/pld-ftp-admin/'
+    ftpadmdir = os.environ['HOME'] + '/pld-ftp-admin'
 else:
-    ftpadmdir = '../'
+    ftpadmdir = '..'
 
 # noarchcachedir is dir where noarch files contents are stored for AI
 # XXX: file reference where the AI resides
-noarchcachedir = ftpadmdir + 'var/noarch-cache/'
+noarchcachedir = ftpadmdir + '/var/noarch-cache/'
 
-tmpdir = ftpadmdir + 'var/tmp/'
+tmpdir = ftpadmdir + '/var/tmp/'
This page took 0.038892 seconds and 4 git commands to generate.