mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
fix calculateFolderSize for non existing files
This commit is contained in:
parent
e7bed5ddab
commit
3f644fe70c
1 changed files with 3 additions and 0 deletions
3
lib/files/cache/cache.php
vendored
3
lib/files/cache/cache.php
vendored
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue