From ef67496dd8764cdde42f5d820a6ab03f5da7645e Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Sat, 18 Aug 2012 18:54:32 +0400 Subject: [PATCH] do scanFreeRecords during init() to be able to auto reset VFS on possible exception (IDEA-77407) --- .../com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java index d40f6bcba74b..43be9583d087 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java @@ -127,7 +127,6 @@ public class FSRecords implements Forceable { w.lock(); if (!ourInitialized) { init(); - scanFreeRecords(); setupFlushing(); ourInitialized = true; } @@ -231,8 +230,9 @@ public class FSRecords implements Forceable { throw new IOException("FS repository wasn't safely shut down"); } markDirty(); + scanFreeRecords(); } - catch (IOException e) { + catch (Exception e) { // IOException, IllegalArgumentException LOG.info("Filesystem storage is corrupted or does not exist. [Re]Building. Reason: " + e.getMessage()); try { closeFiles();