1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 22:04:44 +00:00

Fix bug with linking to broken symlink

This adjustment fixes the exception thrown when `link()` is called with the destination being a broken symlink and having a trailing `/`. `os.path.lexists(dst)` (called [here](0dd9dea1ff/dotdrop/installer.py (L85))) only returns true for broken symlinks without the trailing `/`.
This commit is contained in:
Marcel Robitaille
2018-12-29 10:36:29 -04:00
committed by GitHub
parent 0dd9dea1ff
commit ff5e55c477

View File

@@ -64,7 +64,7 @@ class Installer:
if not os.path.exists(src):
self.log.err('source dotfile does not exist: {}'.format(src))
return []
dst = os.path.expanduser(dst)
dst = os.path.expanduser(dst).rstrip('/')
if self.totemp:
# ignore actions
return self.install(templater, src, dst, actions=[])