mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-10 05:09:17 +00:00
fixed crash when dst directory of symlink doesn't exist
This commit is contained in:
@@ -59,6 +59,9 @@ class Installer:
|
|||||||
if self.dry:
|
if self.dry:
|
||||||
self.log.dry('would link %s to %s' % (dst, src))
|
self.log.dry('would link %s to %s' % (dst, src))
|
||||||
return []
|
return []
|
||||||
|
dstDir = os.path.dirname(dst)
|
||||||
|
if not os.path.exists(dstDir):
|
||||||
|
os.makedirs(dstDir)
|
||||||
os.symlink(src, dst)
|
os.symlink(src, dst)
|
||||||
self.log.sub('linked %s to %s' % (dst, src))
|
self.log.sub('linked %s to %s' % (dst, src))
|
||||||
# Follows original developer's behavior
|
# Follows original developer's behavior
|
||||||
|
|||||||
Reference in New Issue
Block a user