aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-11-08 18:07:30 +0100
committerRobin Appelman <icewind@owncloud.com>2012-11-08 18:07:30 +0100
commit3f644fe70c8451ab1ab877c4dd97f34366548b70 (patch)
tree107b8a781e5465616bf41c7316bd25249bd2e6b3
parente7bed5ddabea5a3841d4a08082badaec025ed242 (diff)
downloadnextcloud-server-3f644fe70c8451ab1ab877c4dd97f34366548b70.tar.gz
nextcloud-server-3f644fe70c8451ab1ab877c4dd97f34366548b70.zip
fix calculateFolderSize for non existing files
-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;