Merge pull request #3176 from nextcloud/default-value-datadir
Add proper default value for datadir
This commit is contained in:
commit
64e9a1aec0
6 changed files with 6 additions and 6 deletions
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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")) {
|
||||
|
|
|
@ -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…
Reference in a new issue