diff options
author | Sven Gothel <[email protected]> | 2013-06-19 04:44:14 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-06-19 04:44:14 +0200 |
commit | 4376174ad35fdaf76f59430328582e913f468674 (patch) | |
tree | eb1faa41eb440b1fec0c5f9932007050e5bd7e8b /src/java/com/jogamp/common/os | |
parent | 88dca02541d96f68a892ae7824e9e1b29793ae55 (diff) |
Fix Bug 757: Regression of URL to URI conversion (Encoded path not compatible w/ file scheme.
Regression of (Bug 683, Commit b98825eb7cfb61aead4a7dff57471cd2d2c26823).
The URI encoded path cannot be read by File I/O (if file scheme), since the latter
requests an UTF8/16 name, not an URI encoded name (i.e. %20 for space).
The encoded URL is produced if calling 'uri.toURL()' and hence
the new 'IOUtil.toURL(URI)' provides a custom conversion recovering the UTF name via 'new File(uri).getPath()'.
Tested w/
- synthetic URI/URL coposition (unit test)
- manual w/ moving 'build' to 'build öä lala' for gluegen, joal and jogl.
+++
Misc.:
- 'URI JarUtil.getURIDirname(URI)' -> 'URI IOUtil.getDirname(URI)'
++
Diffstat (limited to 'src/java/com/jogamp/common/os')
-rw-r--r-- | src/java/com/jogamp/common/os/Platform.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java index 0ae3cbb..9971cf4 100644 --- a/src/java/com/jogamp/common/os/Platform.java +++ b/src/java/com/jogamp/common/os/Platform.java @@ -33,6 +33,7 @@ import java.security.AccessController; import java.security.PrivilegedAction; import java.util.concurrent.TimeUnit; +import com.jogamp.common.util.IOUtil; import com.jogamp.common.util.JarUtil; import com.jogamp.common.util.ReflectionUtil; import com.jogamp.common.util.VersionNumber; @@ -198,7 +199,7 @@ public class Platform extends PlatformPropsImpl { final String jarName = JarUtil.getJarBasename( platformClassJarURI ); final String nativeJarBasename = jarName.substring(0, jarName.indexOf(".jar")); // ".jar" already validated w/ JarUtil.getJarBasename(..) nativeJarName = nativeJarBasename+"-natives-"+PlatformPropsImpl.os_and_arch+".jar"; - jarUriRoot = JarUtil.getURIDirname( JarUtil.getJarSubURI( platformClassJarURI ) ); + jarUriRoot = IOUtil.getDirname( JarUtil.getJarSubURI( platformClassJarURI ) ); nativeJarURI = JarUtil.getJarFileURI(jarUriRoot, nativeJarName); TempJarCache.bootstrapNativeLib(Platform.class, libBaseName, nativeJarURI); } catch (Exception e0) { |