Make flock writing easier
This commit is contained in:
parent
c057954896
commit
aabe39220d
1 changed files with 1 additions and 2 deletions
|
@ -214,10 +214,9 @@ class ConfigFileManager
|
|||
throw new ConfigFileException('config source cannot get encoded');
|
||||
}
|
||||
|
||||
$configStream = fopen($this->configDir . '/' . self::CONFIG_DATA_FILE, 'w+');
|
||||
$configStream = fopen($this->configDir . '/' . self::CONFIG_DATA_FILE, 'w');
|
||||
|
||||
if (flock($configStream, LOCK_EX)) {
|
||||
ftruncate($configStream, 0);
|
||||
fwrite($configStream, $encodedData);
|
||||
fflush($configStream);
|
||||
flock($configStream, LOCK_UN);
|
||||
|
|
Loading…
Reference in a new issue