diff options
-rw-r--r-- | apps/dav/lib/Connector/Sabre/QuotaPlugin.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php index 5222986cb5c..0388bc48f8d 100644 --- a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php +++ b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php @@ -166,11 +166,11 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin { $path = rtrim($parentPath, '/') . '/' . $info['name']; } $freeSpace = $this->getFreeSpace($path); - if ($freeSpace !== FileInfo::SPACE_UNKNOWN && $freeSpace !== FileInfo::SPACE_UNLIMITED && $length > $freeSpace) { + if ($freeSpace >= 0 && $length > $freeSpace) { if (isset($chunkHandler)) { $chunkHandler->cleanup(); } - throw new InsufficientStorage(); + throw new InsufficientStorage("Insufficient space in $path, $length required, $freeSpace available"); } } return true; |