ghidra: fixed paths with spaces unable to be imported into ghidra

This commit is contained in:
xyve 2023-11-21 04:01:40 -06:00
parent bae8952aff
commit 2ae69686ad

View File

@ -61,7 +61,9 @@ public final class LinuxFileUrlHandler extends AbstractFileListFlavorHandler {
return toFiles(transferData, s -> {
try {
return new File(new URL(s).toURI());
// Replacing the spaces with "%20" will allow for file paths with spaces to be parsed correctly
// and not cause an exception
return new File(new URL(s.replaceAll(" ", "%20")).toURI());
}
catch (MalformedURLException e) {
// this could be the case that this handler is attempting to process an arbitrary