Furkan Duman'ın raporladığı #2034 id'li bug'ı kapat..

Teşekkür ediyoruz efendim.
This commit is contained in:
A. Murat Eren
2006-02-10 09:29:53 +00:00
parent 38d28b5311
commit 8f5fc0efed
+10 -5
View File
@@ -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):