From: Robin Appelman Date: Mon, 14 Nov 2022 13:19:47 +0000 (+0100) Subject: fix dirname usage X-Git-Tag: v24.0.8rc1~9^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=438bc818bb58a556cdc90b9117195107c8d8a712;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; }