Fix rel path logic when transferring symlinks

This commit is contained in:
Kovid Goyal
2021-11-05 21:39:07 +05:30
parent d9f4fadf2d
commit 8e8a0d2df6
2 changed files with 4 additions and 18 deletions
+1 -7
View File
@@ -429,13 +429,7 @@ class DestFile:
if lt.startswith('fid:'):
lt = all_files[lt[4:]].name
if self.ftype is FileType.symlink:
try:
cp = os.path.commonpath((self.name, lt))
except ValueError:
pass
else:
if cp:
lt = os.path.relpath(lt, cp)
lt = os.path.relpath(lt, os.path.dirname(self.name))
elif lt.startswith('fid_abs:'):
lt = all_files[lt[8:]].name
elif lt.startswith('path:'):