fix dirname usage

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2022-11-14 14:19:47 +01:00 committed by backportbot-nextcloud[bot]
parent 079a481673
commit 438bc818bb

View file

@ -155,7 +155,11 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin {
}
$path = $destinationNode->getPath();
} else {
$parentNode = $this->server->tree->getNodeForPath(dirname($destinationPath));
$parent = dirname($destinationPath);
if ($parent === '.') {
$parent = '';
}
$parentNode = $this->server->tree->getNodeForPath($parent);
if (!$parentNode instanceof Node) {
return false;
}