Browse Source
Add proper default value for datadir
* better safe than sorry
* fixes #3091
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
pull/3176/head
Morris Jobke
9 years ago
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
6 changed files with
6 additions and
6 deletions
-
apps/files_external/lib/Lib/Storage/SFTP.php
-
apps/files_trashbin/lib/Trashbin.php
-
apps/theming/lib/Util.php
-
lib/private/Repair/MoveUpdaterStepFile.php
-
lib/private/Setup/Sqlite.php
-
lib/private/User/User.php
|
|
|
@ -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; |
|
|
|
} |
|
|
|
|