master
asamoukin 16 years ago
parent e3f2f58adb
commit 39a0baa264

@ -2197,6 +2197,10 @@ class profile(_file, _terms):
prevOldFile = oldFile
oldFile = objHeadNew.params['link']
flagSymlink = True
if not "/" == oldFile[0]:
pathLink = os.path.split(os.path.abspath(prevOldFile))[0]
pathProg = os.getcwd()
os.chdir(pathLink)
oldFileExists = os.path.exists(oldFile)
# В случае force
@ -2275,9 +2279,6 @@ class profile(_file, _terms):
# иначе удаляем файл
os.remove(prevOldFile)
if not "/" == oldFile[0]:
path = os.path.split(os.path.abspath(prevOldFile))[0]
pathProg = os.getcwd()
os.chdir(path)
os.symlink(oldFile, prevOldFile)
os.chdir(pathProg)
else:

Loading…
Cancel
Save