summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-06-30 16:36:11 +0200
committerRobin Appelman <icewind@owncloud.com>2014-06-30 16:36:11 +0200
commit99960d774750ae836697f8191504341f3a6418b6 (patch)
tree38b8ceef765acb15fb905d1d664c146df7ed12a2 /lib
parent30c240a145dd8c9e54b4cd64a78f1020e41a15f4 (diff)
downloadnextcloud-server-99960d774750ae836697f8191504341f3a6418b6.tar.gz
nextcloud-server-99960d774750ae836697f8191504341f3a6418b6.zip
Handle StorageNotAvailableException in webdav
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/objecttree.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php
index 54596db3c47..f283fcf47f7 100644
--- a/lib/private/connector/sabre/objecttree.php
+++ b/lib/private/connector/sabre/objecttree.php
@@ -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) {