symlink'ler ile ilgili ufak bir duzeltme..
+ ontanimli olarak copytree ile kopyalanan dizinler icerisindeki symlink'leri takip etme, symlink olarak kopyala.
This commit is contained in:
@@ -136,12 +136,14 @@ def copy(source, destination):
|
|||||||
if isFile(destination):
|
if isFile(destination):
|
||||||
os.remove(destination)
|
os.remove(destination)
|
||||||
os.symlink(os.readlink(filePath), destination)
|
os.symlink(os.readlink(filePath), destination)
|
||||||
|
else:
|
||||||
|
os.symlink(os.readlink(filePath), destination)
|
||||||
elif isDirectory(filePath):
|
elif isDirectory(filePath):
|
||||||
copytree(filePath, destination)
|
copytree(filePath, destination)
|
||||||
else:
|
else:
|
||||||
error(_('ActionsAPI [copy]: File %s does not exist.') % filePath)
|
error(_('ActionsAPI [copy]: File %s does not exist.') % filePath)
|
||||||
|
|
||||||
def copytree(source, destination, sym = False):
|
def copytree(source, destination, sym = True):
|
||||||
'''recursively copy an entire directory tree rooted at source'''
|
'''recursively copy an entire directory tree rooted at source'''
|
||||||
if isDirectory(source):
|
if isDirectory(source):
|
||||||
if os.path.exists(destination):
|
if os.path.exists(destination):
|
||||||
|
|||||||
Reference in New Issue
Block a user