summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-04-17 23:01:01 +0200
committerGitHub <noreply@github.com>2018-04-17 23:01:01 +0200
commit13d21f5989a3dfba417a506cbe5bac9e794c3fdd (patch)
treeff352426afa2ccbc5c29c7a19c5e12b246c48df7
parentb7d00ff5ef1a70b0331405d4bdf3dc38fd04924e (diff)
parentbc3fde9f758054b1148bb7258ba1a052c0ffc7ec (diff)
downloadnextcloud-server-13d21f5989a3dfba417a506cbe5bac9e794c3fdd.tar.gz
nextcloud-server-13d21f5989a3dfba417a506cbe5bac9e794c3fdd.zip
Merge pull request #9174 from nextcloud/dav-free-space-message
log more information about insufficient storage in dav plugin
-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;