Commit e4255e9d authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Merge pull request #12644 from owncloud/add-hack-for-config

Create config if it does not exists
parents d571f428 bd520d2e
......@@ -188,7 +188,15 @@ class OC {
public static function checkConfig() {
$l = \OC::$server->getL10N('lib');
$configFileWritable = file_exists(self::$configDir . "/config.php") && is_writable(self::$configDir . "/config.php");
// Create config in case it does not already exists
$configFilePath = self::$configDir .'/config.php';
if(!file_exists($configFilePath)) {
@touch($configFilePath);
}
// Check if config is writable
$configFileWritable = is_writable($configFilePath);
if (!$configFileWritable && !OC_Helper::isReadOnlyConfigEnabled()
|| !$configFileWritable && \OCP\Util::needUpgrade()) {
if (self::$CLI) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment