[vcs-log] use deleteWithRenaming instead of delete for invalidating log caches for...
authorJulia Beliaeva <Julia.Beliaeva@jetbrains.com>
Fri, 4 Nov 2016 19:00:54 +0000 (22:00 +0300)
committerJulia Beliaeva <Julia.Beliaeva@jetbrains.com>
Fri, 4 Nov 2016 19:00:54 +0000 (22:00 +0300)
platform/vcs-log/impl/src/com/intellij/vcs/log/impl/VcsLogCachesInvalidator.java

index efb2aa2118c2ed68825e7d07f2b8555418cb792d..3473bfb8224bee6a3c64b9e46d873e33efe7a183 100644 (file)
@@ -26,7 +26,7 @@ public class VcsLogCachesInvalidator extends CachesInvalidator {
 
   public synchronized boolean isValid() {
     if (PersistentUtil.getCorruptionMarkerFile().exists()) {
-      boolean deleted = FileUtil.delete(PersistentUtil.LOG_CACHE);
+      boolean deleted = FileUtil.deleteWithRenaming(PersistentUtil.LOG_CACHE);
       if (!deleted) {
         // if could not delete caches, ensure that corruption marker is still there
         FileUtil.createIfDoesntExist(PersistentUtil.getCorruptionMarkerFile());