diff options
Diffstat (limited to 'lib/private/files/storage/wrapper')
-rw-r--r-- | lib/private/files/storage/wrapper/quota.php | 8 |
1 files changed, 5 insertions, 3 deletions
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; } } |