summaryrefslogtreecommitdiffstats
path: root/apps/files_external/service/storagesservice.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-11-20 15:23:09 +0100
committerRobin Appelman <icewind@owncloud.com>2015-11-20 15:23:09 +0100
commit90ff4641e778f9825047194872bc2dca3344e7b8 (patch)
tree405afa53268be5adda83a3267c5faddc329852a9 /apps/files_external/service/storagesservice.php
parent308aaf89cd916a0c26c219650e09b8612a50fc47 (diff)
downloadnextcloud-server-90ff4641e778f9825047194872bc2dca3344e7b8.tar.gz
nextcloud-server-90ff4641e778f9825047194872bc2dca3344e7b8.zip
dont die if the external storage backend doesn't exist
Diffstat (limited to 'apps/files_external/service/storagesservice.php')
-rw-r--r--apps/files_external/service/storagesservice.php31
1 files changed, 20 insertions, 11 deletions
diff --git a/apps/files_external/service/storagesservice.php b/apps/files_external/service/storagesservice.php
index 41bb0ca9b80..3446ed0dab3 100644
--- a/apps/files_external/service/storagesservice.php
+++ b/apps/files_external/service/storagesservice.php
@@ -221,17 +221,26 @@ abstract class StoragesService {
$currentStorage->setMountPoint($relativeMountPath);
}
- $this->populateStorageConfigWithLegacyOptions(
- $currentStorage,
- $mountType,
- $applicable,
- $storageOptions
- );
-
- if ($hasId) {
- $storages[$configId] = $currentStorage;
- } else {
- $storagesWithConfigHash[$configId] = $currentStorage;
+ try {
+ $this->populateStorageConfigWithLegacyOptions(
+ $currentStorage,
+ $mountType,
+ $applicable,
+ $storageOptions
+ );
+
+ if ($hasId) {
+ $storages[$configId] = $currentStorage;
+ } else {
+ $storagesWithConfigHash[$configId] = $currentStorage;
+ }
+ } catch (\UnexpectedValueException $e) {
+ // dont die if a storage backend doesn't exist
+ \OCP\Util::writeLog(
+ 'files_external',
+ 'Could not load storage: "' . $e->getMessage() . '"',
+ \OCP\Util::ERROR
+ );
}
}
}