Platform.getInstallLocation() and spaces in path fails. [message #1725684] |
Sun, 06 March 2016 14:57  |
Eclipse User |
|
|
|
In my plugin I want to download info in a subfolder of the eclipse install location.
To do so I use the code below which works fine if there are no spaces in the path of the eclipse location.
URI uri;
try {
uri = Platform.getInstallLocation().getURL().toURI();
String defaulDownloadLocation = Paths.get(uri).resolve("arduinoPlugin").toString(); //$NON-NLS-1$
return new Path(defaulDownloadLocation);
} catch (URISyntaxException e) {
// this should not happen
e.printStackTrace();
}
If I have a space in the path I get a malformed URI exception.
I have 2 questions:
1) is this a bug?
2) How can I make this work with spaces?
Best regards
Jantje
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05151 seconds