aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-11-20 16:06:25 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-11-20 16:06:25 +0100
commitf3ff85832356e197ff03582d8ccab729dbc6d375 (patch)
tree5dfa93b4edf4c0eb4bee2d6911e27b02ab0a5ea5
parent427d107b9f375f5667a3e8f40191edd46924fdb8 (diff)
parent90ff4641e778f9825047194872bc2dca3344e7b8 (diff)
downloadnextcloud-server-f3ff85832356e197ff03582d8ccab729dbc6d375.tar.gz
nextcloud-server-f3ff85832356e197ff03582d8ccab729dbc6d375.zip
Merge pull request #20641 from owncloud/files_external_missing_backend
dont die if the external storage backend doesn't exist
-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
+ );
}
}
}