summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-01-01 11:19:33 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2013-01-01 11:19:33 -0500
commitf2ca7023e1ece60dc3cebc5cd770c7373f53c93a (patch)
treee0d35fd7fbd71475422aa3dad9ef0fdf87e9850d /lib
parent3ee3323b8766992a0b60bb76b909e49fc1ea76d2 (diff)
downloadnextcloud-server-f2ca7023e1ece60dc3cebc5cd770c7373f53c93a.tar.gz
nextcloud-server-f2ca7023e1ece60dc3cebc5cd770c7373f53c93a.zip
Fix Shared root problems with Watcher and Quota proxy
Diffstat (limited to 'lib')
-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;
}