mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Fix sabre test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
a5feb51a6a
commit
61a6adff14
1 changed files with 5 additions and 3 deletions
|
|
@ -201,11 +201,13 @@ class FilesPlugin extends ServerPlugin {
|
|||
|
||||
if ($sourceDir !== $destinationDir) {
|
||||
$sourceNodeFileInfo = $sourceNode->getFileInfo();
|
||||
if ($sourceNodeFileInfo !== null && !$sourceNodeFileInfo->isDeletable()) {
|
||||
if ($sourceNodeFileInfo === null) {
|
||||
throw new NotFound($source . ' does not exist');
|
||||
}
|
||||
|
||||
if (!$sourceNodeFileInfo->isDeletable()) {
|
||||
throw new Forbidden($source . " cannot be deleted");
|
||||
}
|
||||
|
||||
throw new NotFound($source . ' does not exist');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue