URISyntaxException when path contains blanks

Description

When upgrading from 5.1.2 to 5.1.3 I get the following URISyntaxException when running IzPack.

It seems to be due to the fact that the folder/path where IzPack is invoked from and/or is installed contains blanks. Other projects without blanks in their path work ok. The installer worked fine with version 5.1.2.

When going over the changes from 5.1.2 to 5.1.3 it seems to be related to pull request #682 that modified FileUtil.java (https://github.com/izpack/izpack/commit/82182fb).

installer:
[echo] Running IzPack to build the installer...
Logging initialized at level 'ALL'
[izpack] Exception in thread "Thread-53" java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 31: file:/Z:/_Jenkins/workspace/CSI Java Suite/DeveloperTools/IzPack5/lib/izpack-native-5.1.3.jar!/com/izforge/izpack/bin/native/izpack/ShellLink.dll
[izpack] at com.izforge.izpack.ant.IzpackAntRunnable.run(IzpackAntRunnable.java:82)
[izpack] at java.lang.Thread.run(Thread.java:748)
[izpack] Caused by: java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 31: file:/Z:/_Jenkins/workspace/CSI Java Suite/DeveloperTools/IzPack5/lib/izpack-native-5.1.3.jar!/com/izforge/izpack/bin/native/izpack/ShellLink.dll
[izpack] at com.izforge.izpack.util.FileUtil.convertUrlToFilePath(FileUtil.java:54)
[izpack] at com.izforge.izpack.merge.resolve.ResolveUtils.processUrlToJarPath(ResolveUtils.java:197)
[izpack] at com.izforge.izpack.merge.resolve.MergeableResolver.getMergeableFromURLWithDestination(MergeableResolver.java:72)
[izpack] at com.izforge.izpack.merge.resolve.PathResolver.getMergeableFromPath(PathResolver.java:121)
[izpack] at com.izforge.izpack.merge.MergeManagerImpl.addResourceToMerge(MergeManagerImpl.java:65)
[izpack] at com.izforge.izpack.compiler.CompilerConfig.addNativeLibraries(CompilerConfig.java:728)
[izpack] at com.izforge.izpack.compiler.CompilerConfig.executeCompiler(CompilerConfig.java:342)
[izpack] at com.izforge.izpack.ant.IzpackAntRunnable.run(IzpackAntRunnable.java:78)
[izpack] ... 1 more
[izpack] Caused by: java.net.URISyntaxException: Illegal character in path at index 31: file:/Z:/_Jenkins/workspace/CSI Java Suite/DeveloperTools/IzPack5/lib/izpack-native-5.1.3.jar!/com/izforge/izpack/bin/native/izpack/ShellLink.dll
[izpack] at java.net.URI$Parser.fail(URI.java:2848)
[izpack] at java.net.URI$Parser.checkChars(URI.java:3021)
[izpack] at java.net.URI$Parser.parseHierarchical(URI.java:3105)
[izpack] at java.net.URI$Parser.parse(URI.java:3053)
[izpack] at java.net.URI.<init>(URI.java:588)
[izpack] at com.izforge.izpack.util.FileUtil.convertUrlToFilePath(FileUtil.java:51)
[izpack] ... 8 more
[echo] Done.

Environment

Winodws, ANT

Status

Assignee

Unassigned

Reporter

Humphrey Clerx

Impact

Functional - may break existing environments

Components

Affects versions

Priority

High
Configure