mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Handle StorageNotAvailableException in webdav
This commit is contained in:
parent
30c240a145
commit
99960d7747
1 changed files with 6 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ namespace OC\Connector\Sabre;
|
|||
use OC\Files\FileInfo;
|
||||
use OC\Files\Filesystem;
|
||||
use OC\Files\Mount\MoveableMount;
|
||||
use OCP\Files\StorageNotAvailableException;
|
||||
|
||||
class ObjectTree extends \Sabre\DAV\ObjectTree {
|
||||
|
||||
|
|
@ -83,7 +84,11 @@ class ObjectTree extends \Sabre\DAV\ObjectTree {
|
|||
}
|
||||
} else {
|
||||
// read from cache
|
||||
$info = $this->fileView->getFileInfo($path);
|
||||
try {
|
||||
$info = $this->fileView->getFileInfo($path);
|
||||
} catch (StorageNotAvailableException $e) {
|
||||
throw new \Sabre\DAV\Exception\ServiceUnavailable('Storage not available');
|
||||
}
|
||||
}
|
||||
|
||||
if (!$info) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue