1
0
mirror of synced 2025-01-29 19:41:45 +03:00

[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:
Benjamin Eberlei 2012-07-05 22:20:16 +02:00
parent 12cddf20e3
commit 82e1d7fa80

View File

@ -190,7 +190,9 @@ class ProxyFactory
throw ProxyException::proxyDirectoryNotWritable();
}
file_put_contents($fileName, $file, LOCK_EX);
$tmpFileName = $fileName . '.' . uniqid("", true);
file_put_contents($tmpFileName, $file);
rename($tmpFileName, $fileName);
}
/**