Skip to content
Snippets Groups Projects
Commit 8ab9cf57 authored by Piotr Ożarowski's avatar Piotr Ożarowski
Browse files

make sure fpath2 and fpath3 exists before comparing

parent f94620d2
No related branches found
No related tags found
No related merge requests found
......@@ -280,7 +280,8 @@ def share_2x(dir1, dir2, dc=None):
os.rename(fpath1, fpath3)
relative_symlink(fpath3, fpath1)
relative_symlink(fpath3, fpath2)
elif fcmp(fpath2, fpath3, shallow=False):
elif exists(fpath2) and exists(fpath3) and \
fcmp(fpath2, fpath3, shallow=False):
os.remove(fpath2)
relative_symlink(fpath3, fpath2)
for dn, dc in common_dirs:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment