GP-5825: Fixing issue with prior commit

This commit is contained in:
Ryan Kurtz 2025-08-27 10:47:13 -04:00
parent b5bfcc0fbf
commit f57b520837

View file

@ -1124,27 +1124,29 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
if (fsService.isLocal(fsrl)) { if (fsService.isLocal(fsrl)) {
try { try {
// It might be a container file that we want to look inside of, so probe // It might be a container file that we want to look inside of, so probe
FileSystemRef fileRef = if (fsService.getLocalFS().getLocalFile(fsrl).isFile()) {
fsService.probeFileForFilesystem(fsrl, monitor, null); FileSystemRef fileRef =
if (fileRef != null) { fsService.probeFileForFilesystem(fsrl, monitor, null);
result.add(new LibrarySearchPath(fileRef, null)); if (fileRef != null) {
result.add(new LibrarySearchPath(fileRef, null));
continue;
}
} }
} }
catch (IOException e) { catch (IOException e) {
log.appendMsg(e.getMessage()); log.appendMsg(e.getMessage());
} }
} }
else {
try (RefdFile fileRef = fsService.getRefdFile(fsrl, monitor)) { try (RefdFile fileRef = fsService.getRefdFile(fsrl, monitor)) {
if (fileRef != null) { if (fileRef != null) {
result.add( result.add(
new LibrarySearchPath(fileRef.fsRef.dup(), fileRef.file.getPath())); new LibrarySearchPath(fileRef.fsRef.dup(), fileRef.file.getPath()));
}
}
catch (IOException e) {
log.appendMsg(e.getMessage());
} }
} }
catch (IOException e) {
log.appendMsg(e.getMessage());
}
} }
success = true; success = true;
} }