1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-07 06:30:50 +00:00

link already exists is not an error (for #154)

This commit is contained in:
deadc0de6
2019-06-11 09:18:07 +02:00
parent e04a0b86e5
commit d6d5ea2ccf

View File

@@ -211,8 +211,10 @@ class Installer:
overwrite = not self.safe
if os.path.lexists(dst):
if os.path.realpath(dst) == os.path.realpath(src):
err = 'ignoring "{}", link exists'.format(dst)
return False, err
msg = 'ignoring "{}", link already exists'.format(dst)
if self.debug:
self.log.dbg(msg)
return True, None
if self.dry:
self.log.dry('would remove {} and link to {}'.format(dst, src))
return True, None