Commit 54878c54 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

storage: Fix semantics for directory size



The actual directory size is "used" space, not the total space on
the filesystem.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 17cb7017
......@@ -102,7 +102,7 @@ class FileStorage(_Base):
values = []
# Pre-calculate information in case it's requested more than once
if COL_SIZE in fields:
if COL_USED in fields:
dirsize = utils.CalculateDirectorySize(path)
else:
dirsize = None
......@@ -116,7 +116,7 @@ class FileStorage(_Base):
if field_name == COL_NAME:
values.append(path)
elif field_name == COL_SIZE:
elif field_name == COL_USED:
values.append(dirsize)
elif field_name == COL_FREE:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment