mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-09 21:39:16 +00:00
fix for #314
This commit is contained in:
@@ -137,7 +137,8 @@ class Installer:
|
|||||||
# symlink
|
# symlink
|
||||||
ret, err = self._link(templater, src, dst,
|
ret, err = self._link(templater, src, dst,
|
||||||
actionexec=actionexec,
|
actionexec=actionexec,
|
||||||
is_template=is_template)
|
is_template=is_template,
|
||||||
|
ignore=ignore)
|
||||||
elif linktype == LinkTypes.LINK_CHILDREN:
|
elif linktype == LinkTypes.LINK_CHILDREN:
|
||||||
# symlink direct children
|
# symlink direct children
|
||||||
if not isdir:
|
if not isdir:
|
||||||
@@ -162,7 +163,7 @@ class Installer:
|
|||||||
# but not when
|
# but not when
|
||||||
# - error (not r, err)
|
# - error (not r, err)
|
||||||
# - aborted (not r, err)
|
# - aborted (not r, err)
|
||||||
if (ret or (not ret and not err)):
|
if os.path.exists(dst) and (ret or (not ret and not err)):
|
||||||
if not chmod:
|
if not chmod:
|
||||||
chmod = utils.get_file_perm(src)
|
chmod = utils.get_file_perm(src)
|
||||||
dstperms = utils.get_file_perm(dst)
|
dstperms = utils.get_file_perm(dst)
|
||||||
@@ -242,7 +243,7 @@ class Installer:
|
|||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
def _link(self, templater, src, dst, actionexec=None,
|
def _link(self, templater, src, dst, actionexec=None,
|
||||||
is_template=True):
|
is_template=True, ignore=None):
|
||||||
"""
|
"""
|
||||||
install link:link
|
install link:link
|
||||||
|
|
||||||
@@ -490,11 +491,6 @@ class Installer:
|
|||||||
# default to nothing installed and no error
|
# default to nothing installed and no error
|
||||||
ret = False, None
|
ret = False, None
|
||||||
|
|
||||||
# create the directory anyway
|
|
||||||
if not self._create_dirs(dst):
|
|
||||||
err = 'creating directory for {}'.format(dst)
|
|
||||||
return False, err
|
|
||||||
|
|
||||||
# handle all files in dir
|
# handle all files in dir
|
||||||
for entry in os.listdir(src):
|
for entry in os.listdir(src):
|
||||||
fpath = os.path.join(src, entry)
|
fpath = os.path.join(src, entry)
|
||||||
@@ -534,6 +530,7 @@ class Installer:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def _write_content_to_file(cls, content, src, dst):
|
def _write_content_to_file(cls, content, src, dst):
|
||||||
"""write content to file"""
|
"""write content to file"""
|
||||||
|
|
||||||
if content:
|
if content:
|
||||||
# write content the file
|
# write content the file
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user