Browse Source

Fix sabre test

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v13.0.0beta1
Roeland Jago Douma 6 years ago
parent
commit
61a6adff14
No account linked to committer's email address
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      apps/dav/lib/Connector/Sabre/FilesPlugin.php

+ 5
- 3
apps/dav/lib/Connector/Sabre/FilesPlugin.php View File

@@ -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…
Cancel
Save