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

Use `file_exists` to verify that config file exists
This commit is contained in:
Morris Jobke 2015-01-27 14:16:40 +01:00
commit 4d90fd933f
1 changed files with 3 additions and 1 deletions

View File

@ -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;