summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/config/configadapter.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-05 10:05:23 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-05 10:05:23 +0100
commit342c2aac98961f91f0fd38423a217cb980dd95b8 (patch)
treeddb43c367f8b27fae912b27d06ce7d1a834ad182 /apps/files_external/lib/config/configadapter.php
parentc8e136b7dc2f51fa260d9eb67452c86f2317c79c (diff)
parentd4da2f0ac717235e57db095cdf3e7f328996ba4c (diff)
downloadnextcloud-server-342c2aac98961f91f0fd38423a217cb980dd95b8.tar.gz
nextcloud-server-342c2aac98961f91f0fd38423a217cb980dd95b8.zip
Merge pull request #20920 from owncloud/issue_20888
Add dialog to enter credentials on errored mount point
Diffstat (limited to 'apps/files_external/lib/config/configadapter.php')
-rw-r--r--apps/files_external/lib/config/configadapter.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/files_external/lib/config/configadapter.php b/apps/files_external/lib/config/configadapter.php
index 2bf39bcaa4f..51c2debd726 100644
--- a/apps/files_external/lib/config/configadapter.php
+++ b/apps/files_external/lib/config/configadapter.php
@@ -130,6 +130,16 @@ class ConfigAdapter implements IMountProvider {
$impl = new FailedStorage(['exception' => $e]);
}
+ try {
+ $availability = $impl->getAvailability();
+ if (!$availability['available']) {
+ $impl = new FailedStorage(['exception' => null]);
+ }
+ } catch (\Exception $e) {
+ // propagate exception into filesystem
+ $impl = new FailedStorage(['exception' => $e]);
+ }
+
$mount = new MountPoint(
$impl,
'/' . $user->getUID() . '/files' . $storage->getMountPoint(),