]> source.dussan.org Git - nextcloud-server.git/commitdiff
allow setting mountpoint with occ files_external:config
authorRobin Appelman <icewind@owncloud.com>
Tue, 12 Jan 2016 16:34:22 +0000 (17:34 +0100)
committerRobin Appelman <icewind@owncloud.com>
Tue, 12 Jan 2016 16:34:22 +0000 (17:34 +0100)
apps/files_external/command/config.php

index 6a57b2dd9616ec6ac527d0ab36432e29478da339..53c9f1375d157e0c0967fbd2d2fa653c4ada7e83 100644 (file)
@@ -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);
        }
 }