summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-08-22 12:32:39 +0200
committerRobin Appelman <robin@icewind.nl>2016-08-22 12:32:39 +0200
commit1e7c108bff45dfa5081fe6c5ec6115fe8c8d699a (patch)
tree8ae1daa3dfd359f0d289ec58487ef4925180acac /apps/files_sharing/lib
parent3ed01e845994192cae29c81024ec1921a96ec31d (diff)
downloadnextcloud-server-1e7c108bff45dfa5081fe6c5ec6115fe8c8d699a.tar.gz
nextcloud-server-1e7c108bff45dfa5081fe6c5ec6115fe8c8d699a.zip
handle failed shares
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/sharedstorage.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 7a7bb58982b..b67c9c5efb4 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -95,6 +95,8 @@ class Shared extends \OC\Files\Storage\Wrapper\Jail implements ISharedStorage {
list($this->storage, $this->rootPath) = $this->ownerView->resolvePath($sourcePath);
$this->sourceRootInfo = $this->storage->getCache()->get($this->rootPath);
} catch (\Exception $e) {
+ $this->storage = new FailedStorage(['exception' => $e]);
+ $this->rootPath = '';
$this->logger->logException($e);
}
}
@@ -293,7 +295,7 @@ class Shared extends \OC\Files\Storage\Wrapper\Jail implements ISharedStorage {
public function getCache($path = '', $storage = null) {
$this->init();
- if (is_null($this->storage)) {
+ if (is_null($this->storage) || $this->storage instanceof FailedStorage) {
return new FailedCache(false);
}
if (!$storage) {