Skip to content
Snippets Groups Projects
Commit 40d72a7d authored by kienle's avatar kienle
Browse files

Fix getDirSize

Fix bug where getDirSize always return (0, 0) no matter the argument.
parent dde4d6ec
No related branches found
No related tags found
1 merge request!21Fix getDirSize always returning (0, 0).
Pipeline #1768 passed with stage
in 2 minutes and 22 seconds
...@@ -44,7 +44,7 @@ def getDirSize(dir): ...@@ -44,7 +44,7 @@ def getDirSize(dir):
totalFile = 0 totalFile = 0
for path, subdirs, files in os.walk(dir): for path, subdirs, files in os.walk(dir):
for fileName in files: for fileName in files:
if not validateFile(path, fileName): if not validateFile(os.path.join(path, fileName), fileName):
continue continue
fp = os.path.join(path, fileName) fp = os.path.join(path, fileName)
# print("file %s: %s" % (fp, os.path.getsize(fp))) # print("file %s: %s" % (fp, os.path.getsize(fp)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment