Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-03-10 12:25:10 +0400
committerLukas Reschke <lukas@statuscode.ch>2013-03-10 12:25:10 +0400
commit3c06020e3ec1e03aeb689c2e12600be1f95091a7 (patch)
tree7076646346c2bc663099eba348e2c5aa4d9bfab7 /apps
parentdfbf57207d2d47a843b514728b7254e76930b20c (diff)
parentbe4806d0314e9b6a4e2487456e4c80b8fac3377b (diff)
Merge pull request #2217 from owncloud/mountconfig-location
Store the global mount configuration file in the datadir
Diffstat (limited to 'apps')
-rwxr-xr-xapps/files_external/lib/config.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 430269e03d9..11d24045fd9 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -307,8 +307,9 @@ 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 = OC::$SERVERROOT.'/config/mount.json';
+ $jsonFile = $datadir . '/mount.json';
}
if (is_file($jsonFile)) {
$mountPoints = json_decode(file_get_contents($jsonFile), true);
@@ -333,7 +334,8 @@ class OC_Mount_Config {
if ($isPersonal) {
$file = OC_User::getHome(OCP\User::getUser()).'/mount.json';
} else {
- $file = OC::$SERVERROOT.'/config/mount.json';
+ $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
+ $file = $datadir . '/mount.json';
}
$content = json_encode($data);
@file_put_contents($file, $content);