summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-02-20 15:15:00 +0100
committerLukas Reschke <lukas@statuscode.ch>2014-02-20 15:15:00 +0100
commitc869e0116b24ee16e531ea7e4b8bd4b890a7021f (patch)
treec15c4aeb1af033a6f61822c32ed7fed02c060f26 /apps/files_external
parent4eadc3609410f992cf3e7e70c9fe33a2d3bfd9e6 (diff)
parent8cc97275200ec9b47d1cd0c38c88c0c076687104 (diff)
downloadnextcloud-server-c869e0116b24ee16e531ea7e4b8bd4b890a7021f.tar.gz
nextcloud-server-c869e0116b24ee16e531ea7e4b8bd4b890a7021f.zip
Merge pull request #6999 from kofemann/mount-config
mount: make location of mount.json configurable
Diffstat (limited to 'apps/files_external')
-rwxr-xr-xapps/files_external/lib/config.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 94dc5fb7ad8..b2109e5eacd 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -352,9 +352,8 @@ class OC_Mount_Config {
$phpFile = OC_User::getHome(OCP\User::getUser()).'/mount.php';
$jsonFile = OC_User::getHome(OCP\User::getUser()).'/mount.json';
} else {
- $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
$phpFile = OC::$SERVERROOT.'/config/mount.php';
- $jsonFile = $datadir . '/mount.json';
+ $jsonFile = \OC_Config::getValue("mount_file", \OC::$SERVERROOT . "/data/mount.json");
}
if (is_file($jsonFile)) {
$mountPoints = json_decode(file_get_contents($jsonFile), true);
@@ -380,8 +379,7 @@ class OC_Mount_Config {
if ($isPersonal) {
$file = OC_User::getHome(OCP\User::getUser()).'/mount.json';
} else {
- $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
- $file = $datadir . '/mount.json';
+ $file = \OC_Config::getValue("mount_file", \OC::$SERVERROOT . "/data/mount.json");
}
$content = json_encode($data);
@file_put_contents($file, $content);