Skip to content

Commit fe92aec

Browse files
come-ncbackportbot-nextcloud[bot]
authored andcommitted
Apply the same fix as on beforeCopy on beforeMove
Let’s be safe Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent ca6ee2d commit fe92aec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/dav/lib/Connector/Sabre/QuotaPlugin.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ public function beforeMove($source, $destination) {
131131
$destinationNode = $this->server->tree->getNodeForPath($destination);
132132
$path = $destinationNode->getPath();
133133
} else {
134-
$parentNode = $this->server->tree->getNodeForPath(dirname($destination));
134+
$parent = dirname($destination);
135+
if ($parent === '.') {
136+
$parent = '';
137+
}
138+
$parentNode = $this->server->tree->getNodeForPath($parent);
135139
$path = $parentNode->getPath();
136140
}
137141

0 commit comments

Comments
 (0)