From 438bc818bb58a556cdc90b9117195107c8d8a712 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 14 Nov 2022 14:19:47 +0100 Subject: [PATCH] fix dirname usage Signed-off-by: Robin Appelman --- apps/dav/lib/Connector/Sabre/QuotaPlugin.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.39.5