summaryrefslogtreecommitdiffstats
path: root/lib/private/files/filesystem.php
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 /lib/private/files/filesystem.php
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 'lib/private/files/filesystem.php')
-rw-r--r--lib/private/files/filesystem.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index b6102f5c245..952f9f9febf 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -320,16 +320,16 @@ class Filesystem {
else {
self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user);
}
- $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
+ $mount_file = \OC_Config::getValue("mount_file", \OC::$SERVERROOT . "/data/mount.json");
//move config file to it's new position
if (is_file(\OC::$SERVERROOT . '/config/mount.json')) {
- rename(\OC::$SERVERROOT . '/config/mount.json', $datadir . '/mount.json');
+ rename(\OC::$SERVERROOT . '/config/mount.json', $mount_file);
}
// Load system mount points
- if (is_file(\OC::$SERVERROOT . '/config/mount.php') or is_file($datadir . '/mount.json')) {
- if (is_file($datadir . '/mount.json')) {
- $mountConfig = json_decode(file_get_contents($datadir . '/mount.json'), true);
+ if (is_file(\OC::$SERVERROOT . '/config/mount.php') or is_file($mount_file)) {
+ if (is_file($mount_file)) {
+ $mountConfig = json_decode(file_get_contents($mount_file), true);
} elseif (is_file(\OC::$SERVERROOT . '/config/mount.php')) {
$mountConfig = $parser->parsePHP(file_get_contents(\OC::$SERVERROOT . '/config/mount.php'));
}