Fix expected trashbin href for spaces

This commit is contained in:
Phil Davis
2023-05-11 11:41:10 +05:45
parent 302986c02e
commit f17351a063
2 changed files with 5 additions and 26 deletions
@@ -254,7 +254,11 @@ class TrashbinContext implements Context {
// avoid "common" situations that could cause infinite recursion.
$trashbinRef = $file["href"];
$trimmedTrashbinRef = \trim($trashbinRef, "/");
$expectedStart = "remote.php/dav/trash-bin/$user";
if ($davPathVersion === WebDavHelper::DAV_VERSION_SPACES) {
$expectedStart = "remote.php/dav/spaces/trash-bin";
} else {
$expectedStart = "remote.php/dav/trash-bin/$user";
}
$expectedStartLength = \strlen($expectedStart);
if ((\substr($trimmedTrashbinRef, 0, $expectedStartLength) !== $expectedStart)
|| (\strlen($trimmedTrashbinRef) === $expectedStartLength)