mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-15 18:30:05 +00:00
check also file rights when installing
This commit is contained in:
@@ -123,7 +123,8 @@ class Installer:
|
|||||||
self.log.dry('would install %s' % (dst))
|
self.log.dry('would install %s' % (dst))
|
||||||
return 0
|
return 0
|
||||||
if os.path.exists(dst):
|
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
|
return 1
|
||||||
if self.safe and not self.log.ask('Overwrite \"%s\"' % (dst)):
|
if self.safe and not self.log.ask('Overwrite \"%s\"' % (dst)):
|
||||||
self.log.warn('ignoring \"%s\", already present' % (dst))
|
self.log.warn('ignoring \"%s\", already present' % (dst))
|
||||||
|
|||||||
Reference in New Issue
Block a user