diff options
Diffstat (limited to 'lib/DAV/WorkspacePlugin.php')
-rw-r--r-- | lib/DAV/WorkspacePlugin.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/DAV/WorkspacePlugin.php b/lib/DAV/WorkspacePlugin.php index c39b5b364..79a8a393a 100644 --- a/lib/DAV/WorkspacePlugin.php +++ b/lib/DAV/WorkspacePlugin.php @@ -31,6 +31,7 @@ use OCA\DAV\Files\FilesHome; use OCA\Text\AppInfo\Application; use OCA\Text\Service\WorkspaceService; use OCP\Files\IRootFolder; +use OCP\Files\StorageNotAvailableException; use OCP\IConfig; use Sabre\DAV\INode; use Sabre\DAV\PropFind; @@ -98,9 +99,13 @@ class WorkspacePlugin extends ServerPlugin { $nodes = $this->rootFolder->getUserFolder($this->userId)->getById($node->getId()); if (count($nodes) > 0) { /** @var File $file */ - $file = $this->workspaceService->getFile($nodes[0]); - if ($file instanceof File) { - return $file->getContent(); + try { + $file = $this->workspaceService->getFile($nodes[0]); + if ($file instanceof File) { + return $file->getContent(); + } + } catch (StorageNotAvailableException $e) { + // If a storage is not available we can for the propfind response assume that there is no rich workspace present } } return ''; |