mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vfs] re-create content storage index map in any doubts
+ if content storage was not closed properly, or recovery was needed -- always re-create and rebuild record's index map, to avoid any inconsistencies GitOrigin-RevId: d448f13c9c72ee50593c82b4a31e8089326c301f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
30ef0f556f
commit
6fbf1cffff
+3
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user