aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/files/cache/cache.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php
index dba026a611e..83d3585bb5f 100644
--- a/lib/files/cache/cache.php
+++ b/lib/files/cache/cache.php
@@ -348,6 +348,9 @@ class Cache {
*/
public function calculateFolderSize($path) {
$id = $this->getId($path);
+ if($id === -1){
+ return 0;
+ }
$query = \OC_DB::prepare('SELECT `size` FROM `*PREFIX*filecache` WHERE `parent` = ? AND `storage` = ?');
$result = $query->execute(array($id, $this->storageId));
$totalSize = 0;