summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/config.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/config.php')
-rw-r--r--apps/files_external/lib/config.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 91e1aa7d509..8fcf39cc767 100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -496,8 +496,16 @@ class OC_Mount_Config {
if (class_exists($class)) {
try {
$storage = new $class($options);
- if ($storage->test($isPersonal)) {
- return self::STATUS_SUCCESS;
+
+ try {
+ $result = $storage->test($isPersonal);
+ $storage->setAvailability($result);
+ if ($result) {
+ return self::STATUS_SUCCESS;
+ }
+ } catch (\Exception $e) {
+ $storage->setAvailability(false);
+ throw $e;
}
} catch (Exception $exception) {
\OCP\Util::logException('files_external', $exception);