Furkan Duman'ın raporladığı #2034 id'li bug'ı kapat..
Teşekkür ediyoruz efendim.
This commit is contained in:
+10
-5
@@ -316,11 +316,6 @@ def get_file_hashes(top, excludePrefix=None, removePrefix=None):
|
||||
raise e
|
||||
return None
|
||||
|
||||
# also handle single files
|
||||
if os.path.isfile(top):
|
||||
yield (top, sha1_sum(top))
|
||||
return
|
||||
|
||||
def has_excluded_prefix(filename):
|
||||
if excludePrefix and removePrefix:
|
||||
tempfnam = remove_prefix(removePrefix, filename)
|
||||
@@ -329,6 +324,16 @@ def get_file_hashes(top, excludePrefix=None, removePrefix=None):
|
||||
return 1
|
||||
return 0
|
||||
|
||||
# handle single file
|
||||
if os.path.isfile(top):
|
||||
yield (top, sha1_sum(top))
|
||||
return
|
||||
|
||||
# handle single symlink declaration here.
|
||||
if os.path.islink(top):
|
||||
yield (top, sha1_sum(os.readlink(top), True))
|
||||
return
|
||||
|
||||
for root, dirs, files in os.walk(top, topdown=False):
|
||||
#bug 339
|
||||
if os.path.islink(root) and not has_excluded_prefix(root):
|
||||
|
||||
Reference in New Issue
Block a user