GP-7176: Checking for unsupported paths during library loading

This commit is contained in:
Ryan Kurtz
2026-08-31 11:16:42 -04:00
parent 6b40e4a239
commit 75964f2f50

View File

@@ -841,6 +841,15 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
}
if (results.isEmpty() && isAbsoluteLibraryPath(library)) {
if (library.startsWith("\\\\")) {
log.appendMsg("Skipping library '%s' with UNC path".formatted(library));
return results;
}
if (library.chars().anyMatch(Character::isISOControl)) {
log.appendMsg("Skipping library '%s' that contains control characters"
.formatted(library));
return results;
}
LocalFileSystem localFS = FileSystemService.getInstance().getLocalFS();
GFile file = lookupLibraryInFs(library, localFS);
Optional.ofNullable(file).ifPresent(results::add);