From: Robin Appelman Date: Mon, 14 Nov 2022 13:19:47 +0000 (+0100) Subject: fix dirname usage X-Git-Tag: v26.0.0beta1~395^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9150082eb7b74fbf91b5dac5433551272200bce8;p=nextcloud-server.git fix dirname usage Signed-off-by: Robin Appelman --- diff --git a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php index dccd10d6021..70a83ccaa68 100644 --- a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php +++ b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php @@ -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; }