]> source.dussan.org Git - nextcloud-server.git/commitdiff
Apply the same fix as on beforeCopy on beforeMove 35328/head
authorCôme Chilliet <come.chilliet@nextcloud.com>
Tue, 15 Nov 2022 17:11:15 +0000 (18:11 +0100)
committerCôme Chilliet <come.chilliet@nextcloud.com>
Tue, 22 Nov 2022 12:56:31 +0000 (13:56 +0100)
Let’s be safe

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
apps/dav/lib/Connector/Sabre/QuotaPlugin.php

index 70a83ccaa68108b8c63c20935f64e19ce2fbf0e8..7c6bf64602ee5f61889568ba0f186be3649aa5c5 100644 (file)
@@ -131,7 +131,11 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin {
                        $destinationNode = $this->server->tree->getNodeForPath($destination);
                        $path = $destinationNode->getPath();
                } else {
-                       $parentNode = $this->server->tree->getNodeForPath(dirname($destination));
+                       $parent = dirname($destination);
+                       if ($parent === '.') {
+                               $parent = '';
+                       }
+                       $parentNode = $this->server->tree->getNodeForPath($parent);
                        $path = $parentNode->getPath();
                }