1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-09 12:19:17 +00:00

fix bug for #179

This commit is contained in:
deadc0de6
2019-07-23 06:08:13 +02:00
parent 709cde144f
commit d5e8b1d294
2 changed files with 14 additions and 11 deletions

View File

@@ -31,6 +31,14 @@ class Comparator:
if self.debug:
self.log.dbg('comparing {} and {}'.format(left, right))
self.log.dbg('ignore pattern(s): {}'.format(ignore))
# test type of file
if os.path.isdir(left) and not os.path.isdir(right):
return '\"{}\" is a dir while \"{}\" is a file\n'.format(left,
right)
if not os.path.isdir(left) and os.path.isdir(right):
return '\"{}\" is a file while \"{}\" is a dir\n'.format(left,
right)
# test content
if not os.path.isdir(left):
if self.debug:
self.log.dbg('is file')