[DDC-1735] Change file_put_contents with LOCK_EX usage to temporary filename + rename, which works on Windows NFS drives.
This commit is contained in:
parent
12cddf20e3
commit
82e1d7fa80
1 changed files with 3 additions and 1 deletions
|
@ -190,7 +190,9 @@ class ProxyFactory
|
||||||
throw ProxyException::proxyDirectoryNotWritable();
|
throw ProxyException::proxyDirectoryNotWritable();
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents($fileName, $file, LOCK_EX);
|
$tmpFileName = $fileName . '.' . uniqid("", true);
|
||||||
|
file_put_contents($tmpFileName, $file);
|
||||||
|
rename($tmpFileName, $fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue