#340 fixed..
This commit is contained in:
+8
-2
@@ -201,11 +201,17 @@ def get_file_hashes(top, excludePrefixes=None, removePrefix=None):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
for root, dirs, files in os.walk(top, topdown=False):
|
for root, dirs, files in os.walk(top, topdown=False):
|
||||||
if os.path.islink(root):
|
if os.path.islink(root) and not hasExcludedPrefix(root):
|
||||||
if not hasExcludedPrefix(root):
|
|
||||||
#yield the symlink..
|
#yield the symlink..
|
||||||
yield (root, sha1_file(root))
|
yield (root, sha1_file(root))
|
||||||
excludePrefixes.append(remove_prefix(removePrefix, root) + "/")
|
excludePrefixes.append(remove_prefix(removePrefix, root) + "/")
|
||||||
|
continue
|
||||||
|
|
||||||
|
if os.path.isdir(root) and not hasExcludedPrefix(root):
|
||||||
|
parent, r, d, f = root, '', '', ''
|
||||||
|
for r, d, f in os.walk(parent, topdown=False): pass
|
||||||
|
if not f and not d:
|
||||||
|
yield (parent, sha1_file(parent))
|
||||||
|
|
||||||
for fname in files:
|
for fname in files:
|
||||||
f = os.path.join(root, fname)
|
f = os.path.join(root, fname)
|
||||||
|
|||||||
Reference in New Issue
Block a user