diff --git a/nilmdb/utils/diskusage.py b/nilmdb/utils/diskusage.py index 0eea832..a7a2c32 100644 --- a/nilmdb/utils/diskusage.py +++ b/nilmdb/utils/diskusage.py @@ -21,7 +21,8 @@ def du(path): errors that might occur if we encounter broken symlinks or files in the process of being removed.""" try: - size = os.path.getsize(path) + st = os.stat(path) + size = st.st_blocks * st.st_blksize if os.path.isdir(path): for thisfile in os.listdir(path): filepath = os.path.join(path, thisfile)