diff options
author | Robin Appelman <robin@icewind.nl> | 2022-11-14 14:19:47 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-11-22 13:56:25 +0100 |
commit | 8a14131a84302d26c76ccda971adac1b8cef02a5 (patch) | |
tree | b2a8271f8e5015efd7621df7bc37d4a3e6ba9095 | |
parent | 5aab36a3f6553d8ead2be2d82578e4f09ae7c8e2 (diff) | |
download | nextcloud-server-8a14131a84302d26c76ccda971adac1b8cef02a5.tar.gz nextcloud-server-8a14131a84302d26c76ccda971adac1b8cef02a5.zip |
fix dirname usage
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | apps/dav/lib/Connector/Sabre/QuotaPlugin.php | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |