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 Côme Chilliet
parent 5aab36a3f6
commit 8a14131a84
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

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;
}