summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/Sabre/QuotaPlugin.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-04-13 11:52:01 +0200
committerRobin Appelman <robin@icewind.nl>2018-04-17 15:29:37 +0200
commitbc3fde9f758054b1148bb7258ba1a052c0ffc7ec (patch)
tree16d4f9f8d48319f27490a347ec0b7cb57c882040 /apps/dav/lib/Connector/Sabre/QuotaPlugin.php
parent991790686a1afe0d4287f1b9d8fe284c0def5daa (diff)
downloadnextcloud-server-bc3fde9f758054b1148bb7258ba1a052c0ffc7ec.tar.gz
nextcloud-server-bc3fde9f758054b1148bb7258ba1a052c0ffc7ec.zip
log more information about insufficient storage in dav plugin
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/QuotaPlugin.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/QuotaPlugin.php4
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;