aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-11-14 14:19:47 +0100
committerCôme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com>2022-11-17 13:22:50 +0000
commit9150082eb7b74fbf91b5dac5433551272200bce8 (patch)
tree9bcbd423a4ea20e31897548407c07e7a71882631 /apps
parent81d3a76d5d09eb5e7977879e6cfa8cea967c0bbf (diff)
downloadnextcloud-server-9150082eb7b74fbf91b5dac5433551272200bce8.tar.gz
nextcloud-server-9150082eb7b74fbf91b5dac5433551272200bce8.zip
fix dirname usage
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Connector/Sabre/QuotaPlugin.php6
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;
}