summaryrefslogtreecommitdiffstats
path: root/apps/files_external/command
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-01-12 17:34:22 +0100
committerRobin Appelman <icewind@owncloud.com>2016-01-12 17:34:22 +0100
commit1861dda313629cf9a10a9b03c7a7b5fe65097ce1 (patch)
tree64339d3e689d6bf9235327b3cfc9c1190cf6fa8e /apps/files_external/command
parenteac5d9fb3a52932fafdb200a2cf5d50fe9f1c759 (diff)
downloadnextcloud-server-1861dda313629cf9a10a9b03c7a7b5fe65097ce1.tar.gz
nextcloud-server-1861dda313629cf9a10a9b03c7a7b5fe65097ce1.zip
allow setting mountpoint with occ files_external:config
Diffstat (limited to 'apps/files_external/command')
-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 6a57b2dd961..53c9f1375d1 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);
}
}