mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-08 17:14:18 +00:00
only chmod if successfully installed
This commit is contained in:
@@ -114,8 +114,6 @@ class Installer:
|
|||||||
self.log.dbg('install {} to {}'.format(src, dst))
|
self.log.dbg('install {} to {}'.format(src, dst))
|
||||||
self.log.dbg('\"{}\" is a directory: {}'.format(src, isdir))
|
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:
|
if linktype == LinkTypes.NOLINK:
|
||||||
# normal file
|
# normal file
|
||||||
if isdir:
|
if isdir:
|
||||||
@@ -149,7 +147,7 @@ class Installer:
|
|||||||
template=template)
|
template=template)
|
||||||
|
|
||||||
# handle chmod
|
# 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)
|
dstperms = utils.get_file_perm(dst)
|
||||||
if dstperms != chmod:
|
if dstperms != chmod:
|
||||||
# apply mode
|
# apply mode
|
||||||
|
|||||||
Reference in New Issue
Block a user