summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-13 10:30:17 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-13 10:30:17 +0100
commita11f6093b7d51fe96ce0fb712ca2d2015dbc5553 (patch)
treeda4593216032ca8ae2cbbb269f4affc2b7db9e93 /apps/files_external
parent3fd976995ab9d2be6523d9db9d1fd79db93faabf (diff)
parent1861dda313629cf9a10a9b03c7a7b5fe65097ce1 (diff)
downloadnextcloud-server-a11f6093b7d51fe96ce0fb712ca2d2015dbc5553.tar.gz
nextcloud-server-a11f6093b7d51fe96ce0fb712ca2d2015dbc5553.zip
Merge pull request #21663 from owncloud/occ-external-mountpoint
allow setting mountpoint with occ files_external:config
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/command/config.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/files_external/command/config.php b/apps/files_external/command/config.php
index 54c09a2fca6..1403c24b345 100644
--- a/apps/files_external/command/config.php
+++ b/apps/files_external/command/config.php
@@ -88,7 +88,11 @@ class Config extends Base {
* @param OutputInterface $output
*/
protected function getOption(StorageConfig $mount, $key, OutputInterface $output) {
- $value = $mount->getBackendOption($key);
+ if ($key === 'mountpoint' || $key === 'mount_point') {
+ $value = $mount->getMountPoint();
+ } else {
+ $value = $mount->getBackendOption($key);
+ }
if (!is_string($value)) { // show bools and objects correctly
$value = json_encode($value);
}
@@ -106,7 +110,11 @@ class Config extends Base {
if (!is_null($decoded)) {
$value = $decoded;
}
- $mount->setBackendOption($key, $value);
+ if ($key === 'mountpoint' || $key === 'mount_point') {
+ $mount->setMountPoint($value);
+ } else {
+ $mount->setBackendOption($key, $value);
+ }
$this->globalService->updateStorage($mount);
}
}