summaryrefslogtreecommitdiff
path: root/apexer/apexer.py
diff options
context:
space:
mode:
Diffstat (limited to 'apexer/apexer.py')
-rw-r--r--apexer/apexer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/apexer/apexer.py b/apexer/apexer.py
index 0e526f3..890a2d2 100644
--- a/apexer/apexer.py
+++ b/apexer/apexer.py
@@ -157,7 +157,10 @@ def GetDirSize(dir_name):
for dirpath, _, filenames in os.walk(dir_name):
size += RoundUp(os.path.getsize(dirpath), BLOCK_SIZE)
for f in filenames:
- size += RoundUp(os.path.getsize(os.path.join(dirpath, f)), BLOCK_SIZE)
+ path = os.path.join(dirpath, f)
+ if not os.path.isfile(path):
+ continue
+ size += RoundUp(os.path.getsize(path), BLOCK_SIZE)
return size