Apply the same fix as on beforeCopy on beforeMove

Let’s be safe

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2022-11-15 18:11:15 +01:00 committed by Côme Chilliet (Rebase PR Action)
parent 9150082eb7
commit feafa63afb

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