Apply the same fix as on beforeCopy on beforeMove

Let’s be safe

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/35009/head
Côme Chilliet 2022-11-15 18:11:15 +07:00 committed by Côme Chilliet (Rebase PR Action)
parent 9150082eb7
commit feafa63afb
1 changed files with 5 additions and 1 deletions

@ -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();
}