Merge pull request #13422 from nextcloud/backport/9174/stable13
[stable13] log more information about insufficient storage in dav plugin
This commit is contained in:
commit
81b02e34dd
|
@ -169,11 +169,11 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin {
|
||||||
$path = rtrim($parentPath, '/') . '/' . $info['name'];
|
$path = rtrim($parentPath, '/') . '/' . $info['name'];
|
||||||
}
|
}
|
||||||
$freeSpace = $this->getFreeSpace($path);
|
$freeSpace = $this->getFreeSpace($path);
|
||||||
if ($freeSpace !== FileInfo::SPACE_UNKNOWN && $freeSpace !== FileInfo::SPACE_UNLIMITED && $length > $freeSpace) {
|
if ($freeSpace >= 0 && $length > $freeSpace) {
|
||||||
if (isset($chunkHandler)) {
|
if (isset($chunkHandler)) {
|
||||||
$chunkHandler->cleanup();
|
$chunkHandler->cleanup();
|
||||||
}
|
}
|
||||||
throw new InsufficientStorage();
|
throw new InsufficientStorage("Insufficient space in $path, $length required, $freeSpace available");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue