Fix code to search for mount.json in custom data folders

This commit is contained in:
Lukas Reschke 2014-02-20 18:34:27 +01:00
parent ec45a3c0e2
commit 6cb64a4fce
1 changed files with 2 additions and 1 deletions

View File

@ -353,7 +353,8 @@ class OC_Mount_Config {
$jsonFile = OC_User::getHome(OCP\User::getUser()).'/mount.json';
} else {
$phpFile = OC::$SERVERROOT.'/config/mount.php';
$jsonFile = \OC_Config::getValue("mount_file", \OC::$SERVERROOT . "/data/mount.json");
$datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data/");
$jsonFile = \OC_Config::getValue("mount_file", $datadir . "/mount.json");
}
if (is_file($jsonFile)) {
$mountPoints = json_decode(file_get_contents($jsonFile), true);