Skip to content
Snippets Groups Projects
Commit 4d90fd93 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #13699 from owncloud/check-if-file-exists

Use `file_exists` to verify that config file exists
parents a870dbe7 17f2cfbb
No related branches found
No related tags found
No related merge requests found
......@@ -166,7 +166,9 @@ class Config {
// Include file and merge config
foreach ($configFiles as $file) {
$filePointer = @fopen($file, 'r');
if($file === $this->configFilePath && $filePointer === false) {
if($file === $this->configFilePath &&
$filePointer === false &&
@!file_exists($this->configFilePath)) {
// Opening the main config might not be possible, e.g. if the wrong
// permissions are set (likely on a new installation)
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment