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

diff even when --force is used

This commit is contained in:
deadc0de6
2017-03-31 14:02:11 +02:00
parent 6b4d24a493
commit 94d9c0603d

View File

@@ -79,10 +79,10 @@ class Installer:
if self.dry: if self.dry:
self.log.dry('would install %s' % (dst)) self.log.dry('would install %s' % (dst))
return 0 return 0
if os.path.exists(dst) and self.safe: if os.path.exists(dst):
if self.diff and self._fake_diff(dst, content): if self.diff and self._fake_diff(dst, content):
return 1 return 1
if 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))
return 1 return 1
if self.backup and os.path.exists(dst): if self.backup and os.path.exists(dst):