Project

General

Profile

patch.txt

Vincent Febvre, 04/21/2016 10:29 AM

Download (751 Bytes)

 
1
--- /usr/lib/python2.7/dist-packages/scribe/login.py.ori	2016-04-21 19:25:25.643376886 +1100
2
+++ /usr/lib/python2.7/dist-packages/scribe/login.py	2016-04-21 19:26:47.672477857 +1100
3
@@ -205,12 +205,14 @@
4
                     share['path'] = share['path'].replace('/home',
5
                             HOME_PATH)
6
                 symlink(share['path'], join(ftpdir, share['name']))
7
+    perso_dir = join(ftpdir, 'perso')
8
     if not isdir(ftpdir):
9
         makedirs(ftpdir, 0500)
10
         chown(ftpdir, uid, -1)
11
         create_ftpsymlink()
12
-    elif not islink(join(ftpdir, 'perso')):
13
-        rmtree(join(ftpdir, 'perso'))
14
+    elif not islink(perso_dir):
15
+        if isfile(perso_dir):
16
+            rmtree(perso_dir)
17
         create_ftpsymlink()
18
 
19