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

only chmod if successfully installed

This commit is contained in:
deadc0de6
2020-11-17 14:33:22 +01:00
parent c39dea9c7c
commit 15e2a9c26d

View File

@@ -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