Commit e1d2f898 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Fixes #447

parent ecefb5c1
...@@ -101,7 +101,7 @@ class BackEnd: ...@@ -101,7 +101,7 @@ class BackEnd:
raise NameError('Container does not exist') raise NameError('Container does not exist')
contents = os.listdir(fullname) contents = os.listdir(fullname)
count = len(contents) count = len(contents)
size = sum(os.path.getsize(os.path.join(self.basepath, account, name, objectname)) for objectname in contents) size = os.stat(fullname).st_size
meta = self.__get_metadata(os.path.join(account, name)) meta = self.__get_metadata(os.path.join(account, name))
meta.update({'name': name, 'count': count, 'bytes': size}) meta.update({'name': name, 'count': count, 'bytes': size})
return meta return meta
...@@ -127,11 +127,10 @@ class BackEnd: ...@@ -127,11 +127,10 @@ class BackEnd:
if not os.path.exists(fullname): if not os.path.exists(fullname):
raise NameError('Account does not exist') raise NameError('Account does not exist')
containers = os.listdir(fullname) containers = os.listdir(fullname)
start = 0 start = 0
if marker: if marker:
try: try:
start = containers.index(marker) start = containers.index(marker) + 1
except ValueError: except ValueError:
pass pass
if not limit or limit > 10000: if not limit or limit > 10000:
......
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