From 8f3ebe82464828a80b25aa64f96da66b81842128 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Wed, 2 May 2018 16:47:42 +0200 Subject: [PATCH] check also file rights when installing --- dotdrop/installer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotdrop/installer.py b/dotdrop/installer.py index 469f4d8..b8ef8f8 100644 --- a/dotdrop/installer.py +++ b/dotdrop/installer.py @@ -123,7 +123,8 @@ class Installer: self.log.dry('would install %s' % (dst)) return 0 if os.path.exists(dst): - if self.diff and self._fake_diff(dst, content): + samerights = os.stat(dst).st_mode == rights + if self.diff and self._fake_diff(dst, content) and samerights: return 1 if self.safe and not self.log.ask('Overwrite \"%s\"' % (dst)): self.log.warn('ignoring \"%s\", already present' % (dst))