Ghidra is a software reverse engineering (SRE) framework
GP-1411 minor correction to filesystem index rebuild
ghidra13f351eed4165
diff --git a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/IndexedLocalFileSystem.java b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/IndexedLocalFileSystem.javaindex 056d4a63b8..a1dd2ffaf7 100644--- a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/IndexedLocalFileSystem.java+++ b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/IndexedLocalFileSystem.java@@ -588,29 +588,29 @@ public class IndexedLocalFileSystem extends LocalFileSystem {return false;}- indexJournal.open();- try {- String conflictedItemStorageName = findItemStorageName(parentPath, name);+ String conflictedItemStorageName = findItemStorageName(parentPath, name);- String storageName = pfile.getStorageName();+ String storageName = pfile.getStorageName();- if (conflictedItemStorageName != null) {- try {- if (storageName.compareTo(conflictedItemStorageName) <= 0) {- conflictedItemStorageName = storageName;- return true; // skip conflict orphan- }-- // remove conflict orphan from index and, add newer item below- deallocateItemStorage(parentPath, name);+ if (conflictedItemStorageName != null) {+ try {+ if (storageName.compareTo(conflictedItemStorageName) <= 0) {+ conflictedItemStorageName = storageName;+ return true; // skip conflict orphan}- finally {- Msg.warn(this,- "Detected orphaned project file " + conflictedItemStorageName + ": " +++ // remove conflict orphan from index and, add newer item below+ deallocateItemStorage(parentPath, name);+ }+ finally {+ Msg.warn(this,+ "Detected orphaned project file " + conflictedItemStorageName + ": " +getPath(parentPath, name));- }}+ }+ indexJournal.open();+ try {Folder folder = addFolderToIndexIfMissing(parentPath);Item item = new Item(folder, name, pfile.getStorageName());bumpNextFileIndexID(item.getStorageName());