Browse Source

Add proper default value for datadir

* better safe than sorry
* fixes #3091

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
tags/v12.0.0beta1
Morris Jobke 7 years ago
parent
commit
a4ad8af6e3
No account linked to committer's email address

+ 1
- 1
apps/files_external/lib/Lib/Storage/SFTP.php View File

@@ -207,7 +207,7 @@ class SFTP extends \OC\Files\Storage\Common {
try {
$storage_view = \OCP\Files::getStorage('files_external');
if ($storage_view) {
return \OC::$server->getConfig()->getSystemValue('datadirectory') .
return \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') .
$storage_view->getAbsolutePath('') .
'ssh_hostKeys';
}

+ 1
- 1
apps/files_trashbin/lib/Trashbin.php View File

@@ -902,7 +902,7 @@ class Trashbin {
* @return integer size of the folder
*/
private static function calculateSize($view) {
$root = \OC::$server->getConfig()->getSystemValue('datadirectory') . $view->getAbsolutePath('');
$root = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . $view->getAbsolutePath('');
if (!file_exists($root)) {
return 0;
}

+ 1
- 1
apps/theming/lib/Util.php View File

@@ -128,7 +128,7 @@ class Util {
} catch (AppPathNotFoundException $e) {}

if($this->config->getAppValue('theming', 'logoMime', '') !== '' && $this->rootFolder->nodeExists('/themedinstancelogo')) {
return $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/') . '/themedinstancelogo';
return $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/themedinstancelogo';
}
return \OC::$SERVERROOT . '/core/img/logo.svg';
}

+ 1
- 1
lib/private/Repair/MoveUpdaterStepFile.php View File

@@ -44,7 +44,7 @@ class MoveUpdaterStepFile implements IRepairStep {

public function run(IOutput $output) {

$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT);
$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
$instanceId = $this->config->getSystemValue('instanceid', null);

if(!is_string($instanceId) || empty($instanceId)) {

+ 1
- 1
lib/private/Setup/Sqlite.php View File

@@ -33,7 +33,7 @@ class Sqlite extends AbstractDatabase {
}

public function setupDatabase($username) {
$datadir = \OC::$server->getSystemConfig()->getValue('datadirectory');
$datadir = \OC::$server->getSystemConfig()->getValue('datadirectory', \OC::$SERVERROOT . '/data');

//delete the old sqlite database first, might cause infinte loops otherwise
if(file_exists("$datadir/owncloud.db")) {

+ 1
- 1
lib/private/User/User.php View File

@@ -267,7 +267,7 @@ class User implements IUser {
if ($this->backend->implementsActions(Backend::GET_HOME) and $home = $this->backend->getHome($this->uid)) {
$this->home = $home;
} elseif ($this->config) {
$this->home = $this->config->getSystemValue('datadirectory') . '/' . $this->uid;
$this->home = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/' . $this->uid;
} else {
$this->home = \OC::$SERVERROOT . '/data/' . $this->uid;
}

Loading…
Cancel
Save