diff options
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/files/storage/local.php | 2 | ||||
-rw-r--r-- | lib/private/files/storage/wrapper/quota.php | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php index e8be7daba7e..7efa49a86c5 100644 --- a/lib/private/files/storage/local.php +++ b/lib/private/files/storage/local.php @@ -282,7 +282,7 @@ if (\OC_Util::runningOnWindows()) { * @param string $path * @return string */ - protected function getSourcePath($path) { + public function getSourcePath($path) { $fullPath = $this->datadir . $path; return $fullPath; } diff --git a/lib/private/files/storage/wrapper/quota.php b/lib/private/files/storage/wrapper/quota.php index bf169e41f13..ed709eb2ce1 100644 --- a/lib/private/files/storage/wrapper/quota.php +++ b/lib/private/files/storage/wrapper/quota.php @@ -124,9 +124,11 @@ class Quota extends Wrapper { $source = $this->storage->fopen($path, $mode); $free = $this->free_space(''); if ($source && $free >= 0 && $mode !== 'r' && $mode !== 'rb') { - return \OC\Files\Stream\Quota::wrap($source, $free); - } else { - return $source; + // only apply quota for files, not metadata, trash or others + if (strpos(ltrim($path, '/'), 'files/') === 0) { + return \OC\Files\Stream\Quota::wrap($source, $free); + } } + return $source; } } |