From b5bfcc0fbf0f8c02279fd5ac4e4d1d6941101f32 Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Wed, 27 Aug 2025 06:00:56 -0400 Subject: [PATCH] GP-5825: Fixing regression with loading libraries from container file --- .../opinion/AbstractLibrarySupportLoader.java | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) 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.java index 6bc3daf4ff..1fb58c3774 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 @@ -1121,14 +1121,29 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader continue; } - try (RefdFile fileRef = fsService.getRefdFile(fsrl, monitor)) { - if (fileRef != null) { - result.add( - new LibrarySearchPath(fileRef.fsRef.dup(), fileRef.file.getPath())); + if (fsService.isLocal(fsrl)) { + try { + // It might be a container file that we want to look inside of, so probe + FileSystemRef fileRef = + fsService.probeFileForFilesystem(fsrl, monitor, null); + if (fileRef != null) { + result.add(new LibrarySearchPath(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) { + result.add( + new LibrarySearchPath(fileRef.fsRef.dup(), fileRef.file.getPath())); + } + } + catch (IOException e) { + log.appendMsg(e.getMessage()); + } } } success = true;