diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-07-24 21:14:06 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-01 08:20:17 +0200 |
commit | 61a6adff143b405dd5e0f2fe3785286692126f0c (patch) | |
tree | 62f991e03d422c8ce9b6fbe97250d8876884f030 /apps/dav/lib | |
parent | a5feb51a6afd92d5afdb5ff0e27641dd451a8e30 (diff) | |
download | nextcloud-server-61a6adff143b405dd5e0f2fe3785286692126f0c.tar.gz nextcloud-server-61a6adff143b405dd5e0f2fe3785286692126f0c.zip |
Fix sabre test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/FilesPlugin.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index d4aa277fdc8..726dd13cced 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/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'); } } |