mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-09-20 17:41:48 +00:00
GP-4563: Fix for container file search paths
This commit is contained in:
parent
99fa2065b8
commit
ab97ddbe7d
|
@ -1122,12 +1122,28 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
|
|||
boolean 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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user