log more information about insufficient storage in dav plugin

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/9174/head
Robin Appelman 7 years ago
parent 991790686a
commit bc3fde9f75
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
  1. 4
      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;

Loading…
Cancel
Save