diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-11-08 18:07:30 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-11-08 18:07:30 +0100 |
commit | 3f644fe70c8451ab1ab877c4dd97f34366548b70 (patch) | |
tree | 107b8a781e5465616bf41c7316bd25249bd2e6b3 | |
parent | e7bed5ddabea5a3841d4a08082badaec025ed242 (diff) | |
download | nextcloud-server-3f644fe70c8451ab1ab877c4dd97f34366548b70.tar.gz nextcloud-server-3f644fe70c8451ab1ab877c4dd97f34366548b70.zip |
fix calculateFolderSize for non existing files
-rw-r--r-- | lib/files/cache/cache.php | 3 |
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; |