Skip to content

Space in file path causes IllegalArgumentException #39

@marpet

Description

@marpet

When a file path is converted to an URL in order to read a zipped ZNAP file in SNAP an IllegalArgumentException is thrown if this path contains a space.

java.net.URISyntaxException: Illegal character in opaque part at index 71: jar:file:/C:/Users/<snip>/RSEO content/S2A_MSIL2A_20230227T160221_N0509_R097_T17QLF_20230227T225659_subset20m.znap.zip at java.net.URI$Parser.fail(URI.java:2848) at java.net.URI$Parser.checkChars(URI.java:3021) at java.net.URI$Parser.parse(URI.java:3058) at java.net.URI.<init>(URI.java:588) at java.net.URI.create(URI.java:850) Caused: java.lang.IllegalArgumentException: Illegal character in opaque part at index 71: jar:file:/C:/Users/<snip>/RSEO content/S2A_MSIL2A_20230227T160221_N0509_R097_T17QLF_20230227T225659_subset20m.znap.zip at java.net.URI.create(URI.java:852) at com.bc.zarr.storage.ZipStore.<init>(ZipStore.java:57) at org.esa.snap.dataio.znap.ZnapProductWriter.writeProductNodesImpl(ZnapProductWriter.java:255) at org.esa.snap.core.dataio.AbstractProductWriter.writeProductNodes(AbstractProductWriter.java:111)

Before the JAR URI is created the URL needs probably be decoded.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions