From 15e2a9c26d6bf3314147baf1e7119d16c05f2bce Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Tue, 17 Nov 2020 14:33:22 +0100 Subject: [PATCH] only chmod if successfully installed --- dotdrop/installer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dotdrop/installer.py b/dotdrop/installer.py index 4867b77..f833c0a 100644 --- a/dotdrop/installer.py +++ b/dotdrop/installer.py @@ -114,8 +114,6 @@ class Installer: self.log.dbg('install {} to {}'.format(src, dst)) self.log.dbg('\"{}\" is a directory: {}'.format(src, isdir)) - # TODO remove template and set templater - # to None when no template should occur if linktype == LinkTypes.NOLINK: # normal file if isdir: @@ -149,7 +147,7 @@ class Installer: template=template) # handle chmod - if chmod and not self.dry: + if r and not err and chmod and not self.dry: dstperms = utils.get_file_perm(dst) if dstperms != chmod: # apply mode