Skip to content

Conversation

@fthevenet
Copy link

This PR aims to address issue #972

Application launched via a JNLP file will failed to start for user wtih certain characters in their home folder (e.g. C:\Users\Foo_O'Bar), which is a legal path on Windows, but paths for downloaded asset are incorrectly sanitize as C:\Users\Foo_O_Bar and the application then fails as it attempts to access content in C:\Users\Foo_O_Bar\... instead of C:\Users\Foo_OBar...

@janakmulani
Copy link
Contributor

@fthevenet we think removing the character "'" from INVALID_PATH list in FileUtils.java should fix the issue of "Foo_O'Bar" as "'" is a valid character for filepath in Windows. Can you please try this fix and resubmit the PR?

@fthevenet
Copy link
Author

fthevenet commented May 23, 2025

I don't think this is the right approach even though it would indeed fix this particular occurrence.
For example, the same problem would arise with a root path for the cache folder containing the character : on Linux, which, while legal on this file system, would be incorrectly sanitized and result in the same FileNotFoundException.

On the other hand, I think the root parameter used by the method should always contain a path that is legal for the runtime platform, since it is derived from system properties or supplied by the user via a property, so sanitizing this part of the path gains us nothing anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants