Catch StorageInvalidException in webdav

This commit is contained in:
Robin Appelman 2014-07-01 15:03:29 +02:00
parent 8339618ead
commit 8161104420
1 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,7 @@ namespace OC\Connector\Sabre;
use OC\Files\FileInfo;
use OC\Files\Filesystem;
use OC\Files\Mount\MoveableMount;
use OCP\Files\StorageInvalidException;
use OCP\Files\StorageNotAvailableException;
class ObjectTree extends \Sabre\DAV\ObjectTree {
@ -88,6 +89,8 @@ class ObjectTree extends \Sabre\DAV\ObjectTree {
$info = $this->fileView->getFileInfo($path);
} catch (StorageNotAvailableException $e) {
throw new \Sabre\DAV\Exception\ServiceUnavailable('Storage not available');
} catch (StorageInvalidException $e){
throw new \Sabre\DAV\Exception\NotFound('Storage ' . $path . ' is invalid');
}
}