From 6252f07fbccfed0867322fc41d7c2120e821a82f Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 13 Apr 2018 11:52:01 +0200 Subject: log more information about insufficient storage in dav plugin Signed-off-by: Robin Appelman --- apps/dav/lib/Connector/Sabre/QuotaPlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php index af45f526831..475acd7889d 100644 --- a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php +++ b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php @@ -169,11 +169,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; -- cgit v1.2.3