aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files/filesystem.php
diff options
context:
space:
mode:
authorTigran Mkrtchyan <tigran.mkrtchyan@desy.de>2014-01-15 12:49:47 +0100
committerTigran Mkrtchyan <tigran.mkrtchyan@desy.de>2014-01-29 17:14:23 +0100
commit8cc97275200ec9b47d1cd0c38c88c0c076687104 (patch)
tree07b90624c496e0c724d2cca12ed2aa4ade27bdaf /lib/private/files/filesystem.php
parentafa00318bcabf53bed4f33633dae55c9efa43dd7 (diff)
downloadnextcloud-server-8cc97275200ec9b47d1cd0c38c88c0c076687104.tar.gz
nextcloud-server-8cc97275200ec9b47d1cd0c38c88c0c076687104.zip
mount: make location of mount.json configurable
do not share users data with config files Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
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 a83e9aa86d2..f5e723afab0 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'));
}