Ghidra is a software reverse engineering (SRE) framework
GP-4563: Fix for container file search paths
Ryan Kurtzab97ddbe7da4
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractLibrarySupportLoader.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractLibrarySupportLoader.javaindex 482f68a82a..f320158e2e 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractLibrarySupportLoader.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractLibrarySupportLoader.java@@ -1122,12 +1122,28 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoaderboolean success = false;try {for (FSRL fsrl : LibrarySearchPathManager.getLibraryFsrlList(log, monitor)) {- try (RefdFile fileRef = fsService.getRefdFile(fsrl, monitor)) {- File f = new File(fileRef.file.getPath()); // File API will sanitize Windows-style paths- result.add(new FileSystemSearchPath(fileRef.fsRef.dup(), f.toPath()));+ if (fsService.isLocal(fsrl)) {+ try {+ FileSystemRef fileRef =+ fsService.probeFileForFilesystem(fsrl, monitor, null);+ if (fileRef != null) {+ result.add(new FileSystemSearchPath(fileRef, null));+ }+ }+ catch (IOException e) {+ log.appendMsg(e.getMessage());+ }}- catch (IOException e) {- log.appendMsg(e.getMessage());+ else {+ try (RefdFile fileRef = fsService.getRefdFile(fsrl, monitor)) {+ if (fileRef != null) {+ File f = new File(fileRef.file.getPath()); // File API will sanitize Windows-style paths+ result.add(new FileSystemSearchPath(fileRef.fsRef.dup(), f.toPath()));+ }+ }+ catch (IOException e) {+ log.appendMsg(e.getMessage());+ }}}success = true;