Browse Source

Fix sabre test

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/5847/head
Roeland Jago Douma 9 years ago
parent
commit
61a6adff14
No known key found for this signature in database GPG Key ID: F941078878347C0C
  1. 8
      apps/dav/lib/Connector/Sabre/FilesPlugin.php

8
apps/dav/lib/Connector/Sabre/FilesPlugin.php

@ -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