From 4909a366ed6b81d16af6898167ac342c6b65916f Mon Sep 17 00:00:00 2001 From: drebs Date: Thu, 16 Mar 2017 19:11:18 +0100 Subject: [bug] return 0 quota if user's blob dir doesn't exist --- server/src/leap/soledad/server/_blobs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/src') diff --git a/server/src/leap/soledad/server/_blobs.py b/server/src/leap/soledad/server/_blobs.py index 956df642..729f213d 100644 --- a/server/src/leap/soledad/server/_blobs.py +++ b/server/src/leap/soledad/server/_blobs.py @@ -151,7 +151,8 @@ class FilesystemBlobsBackend(object): raise NotImplementedError def _get_disk_usage(self, start_path): - assert os.path.isdir(start_path) + if not os.path.isdir(start_path): + return 0 cmd = 'du -c %s | tail -n 1' % start_path size = commands.getoutput(cmd).split()[0] return int(size) -- cgit v1.2.3