Commit 6e3a8416 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #12139 from owncloud/DoNotTouchMe

Try to read the file only instead of trying to touch
parents d5796bba 49ddaf94
......@@ -138,12 +138,12 @@ class Config {
// Include file and merge config
foreach ($configFiles as $file) {
if($file === $this->configFilePath && !@touch($file)) {
// Writing to the main config might not be possible, e.g. if the wrong
$filePointer = @fopen($file, 'r');
if($file === $this->configFilePath && $filePointer === false) {
// Opening the main config might not be possible, e.g. if the wrong
// permissions are set (likely on a new installation)
continue;
}
$filePointer = fopen($file, 'r');
// Try to acquire a file lock
if(!flock($filePointer, LOCK_SH)) {
......
Markdown is supported
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