From 1861dda313629cf9a10a9b03c7a7b5fe65097ce1 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 12 Jan 2016 17:34:22 +0100 Subject: [PATCH] allow setting mountpoint with occ files_external:config --- apps/files_external/command/config.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/files_external/command/config.php b/apps/files_external/command/config.php index 6a57b2dd96..53c9f1375d 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); } }