]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix dirname usage
authorRobin Appelman <robin@icewind.nl>
Mon, 14 Nov 2022 13:19:47 +0000 (14:19 +0100)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Tue, 22 Nov 2022 13:53:11 +0000 (13:53 +0000)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/dav/lib/Connector/Sabre/QuotaPlugin.php

index dccd10d6021dbc501b0c41890cee4cfc5d058050..70a83ccaa68108b8c63c20935f64e19ce2fbf0e8 100644 (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;
                        }