1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-10 19:39:15 +00:00
This commit is contained in:
deadc0de6
2020-11-19 15:03:38 +01:00
parent 2ee70ff8ab
commit d253610f2d

View File

@@ -43,6 +43,8 @@ class Comparator:
# test content # test content
if not os.path.isdir(left): if not os.path.isdir(left):
if self.debug:
self.log.dbg('{} is a file'.format(left))
if self.debug: if self.debug:
self.log.dbg('is file') self.log.dbg('is file')
ret = self._comp_file(left, right, ignore) ret = self._comp_file(left, right, ignore)
@@ -51,7 +53,7 @@ class Comparator:
return ret return ret
if self.debug: if self.debug:
self.log.dbg('is directory') self.log.dbg('{} is a directory'.format(left))
ret = self._comp_dir(left, right, ignore) ret = self._comp_dir(left, right, ignore)
if not ret: if not ret:
@@ -64,7 +66,11 @@ class Comparator:
right_mode = get_file_perm(right) right_mode = get_file_perm(right)
if left_mode == right_mode: if left_mode == right_mode:
return '' return ''
ret = 'modes differ ({:o} vs {:o})\n'.format(left_mode, right_mode) if self.debug:
msg = 'mode differ {} ({:o}) and {} ({:o})'
self.log.dbg(msg.format(left, left_mode, right, right_mode))
ret = 'modes differ for {} ({:o}) vs {:o}\n'
ret.format(right, right_mode, left_mode)
return ret return ret
def _comp_file(self, left, right, ignore): def _comp_file(self, left, right, ignore):