diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-07 17:31:03 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-07 17:31:03 +0200 |
commit | b3a1aef93414ee1ec3a124f66a6964a27338b44c (patch) | |
tree | c933beada324e6bb810c4c57dbb1f7dde5320bbf /apps | |
parent | 404b5a2e4a4ddb1b2d6b8c430686b4c3fb68beb0 (diff) | |
parent | 75a5e6e12b18a9f5b7b113cd7e2c9c56c204084d (diff) | |
download | nextcloud-server-b3a1aef93414ee1ec3a124f66a6964a27338b44c.tar.gz nextcloud-server-b3a1aef93414ee1ec3a124f66a6964a27338b44c.zip |
Merge pull request #13641 from owncloud/cache-storage-status
Store storage availability in database
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/config.php | 12 |
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); |