summaryrefslogtreecommitdiffstats
path: root/lib/fileproxy/quota.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fileproxy/quota.php')
-rw-r--r--lib/fileproxy/quota.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php
index 80270728aba..c333efa6cdf 100644
--- a/lib/fileproxy/quota.php
+++ b/lib/fileproxy/quota.php
@@ -63,6 +63,9 @@ class OC_FileProxy_Quota extends OC_FileProxy{
*/
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($path);
$owner=$storage->getOwner($internalPath);
+ if (!$owner) {
+ return -1;
+ }
$totalSpace=$this->getQuota($owner);
if($totalSpace==-1) {
@@ -73,7 +76,6 @@ class OC_FileProxy_Quota extends OC_FileProxy{
$rootInfo=$view->getFileInfo('/');
$usedSpace=isset($rootInfo['size'])?$rootInfo['size']:0;
- $usedSpace=isset($sharedInfo['size'])?$usedSpace-$sharedInfo['size']:$usedSpace;
return $totalSpace-$usedSpace;
}