diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/mapped/content/VFSContentStorageOverMMappedFile.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/mapped/content/VFSContentStorageOverMMappedFile.java index 2ec58d968780..284780865f91 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/mapped/content/VFSContentStorageOverMMappedFile.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/mapped/content/VFSContentStorageOverMMappedFile.java @@ -153,7 +153,9 @@ public class VFSContentStorageOverMMappedFile implements VFSContentStorage, Unma .open(storagePath); Path mapPath = storagePath.resolveSibling(storagePath.getFileName().toString() + ".hashToId"); - if (contentStorage.isEmpty()) { + if (contentStorage.isEmpty() + || !contentStorage.wasClosedProperly() + || contentStorage.wasRecoveryNeeded()) { //ensure map is also empty NioFiles.deleteRecursively(mapPath); }