rewriteIndexVersion atomically (followup for http://crucible.labs.intellij.net/cru/CR-IC-573)

This commit is contained in:
Maxim.Mossienko
2013-04-10 21:55:49 +02:00
parent 55d981e071
commit 31375c4d81
@@ -70,7 +70,7 @@ public class IndexInfrastructure {
private static volatile long ourLastStamp; // ensure any file index stamp increases
public static void rewriteVersion(final File file, final int version) throws IOException {
public static synchronized void rewriteVersion(final File file, final int version) throws IOException {
final long prevLastModifiedValue = file.lastModified();
if (file.exists()) {
FileUtil.delete(file);