[Pkg-owncloud-commits] [owncloud] 147/273: Handle StorageNotAvailableException in webdav

David Prévot taffit at moszumanska.debian.org
Fri Jul 4 03:13:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 99960d774750ae836697f8191504341f3a6418b6
Author: Robin Appelman <icewind at owncloud.com>
Date:   Mon Jun 30 16:36:11 2014 +0200

    Handle StorageNotAvailableException in webdav
---
 lib/private/connector/sabre/objecttree.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php
index 54596db..f283fcf 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) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list