fix calculateFolderSize for non existing files

This commit is contained in:
Robin Appelman 2012-11-08 18:07:30 +01:00
parent e7bed5ddab
commit 3f644fe70c

View file

@ -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;