Skip to content

Commit

Permalink
GP-4563: Fix for container file search paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmkurtz committed May 23, 2024
1 parent 99fa206 commit ab97ddb
Showing 1 changed file with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1122,12 +1122,28 @@ private List<FileSystemSearchPath> getSystemLibrarySearchPaths(List<Option> opti
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;
Expand Down

0 comments on commit ab97ddb

Please sign in to comment.