diff options
author | Sven Gothel <[email protected]> | 2023-11-28 10:14:03 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-11-28 10:14:03 +0100 |
commit | 0f731bfabcdd19665c3c09c5f40f898101c501c9 (patch) | |
tree | 3c641b65227a7ef7d52fa4e96e22c94e34e2ee91 | |
parent | c8cb87e17a14281a9d0e2f311b8534ecb7ac00b4 (diff) |
Bug 1474: Only quote exe-file path on Windows for execution
Double quoting of the exe-file for execution is only allowed and required on Window.
-rwxr-xr-x | make/scripts/runtest.sh | 4 | ||||
-rw-r--r-- | src/java/com/jogamp/common/util/IOUtil.java | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/make/scripts/runtest.sh b/make/scripts/runtest.sh index d6d5a45..570c5f1 100755 --- a/make/scripts/runtest.sh +++ b/make/scripts/runtest.sh @@ -99,7 +99,7 @@ function onetest() { echo } # -#onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG +onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG #onetest com.jogamp.common.util.TestSystemPropsAndEnvs 2>&1 | tee -a $LOG #onetest com.jogamp.common.util.TestVersionInfo 2>&1 | tee -a $LOG #onetest com.jogamp.common.util.TestVersionNumber 2>&1 | tee -a $LOG @@ -137,7 +137,7 @@ function onetest() { #onetest com.jogamp.common.net.TestUri01 2>&1 | tee -a $LOG #onetest com.jogamp.common.net.TestUri02Composing 2>&1 | tee -a $LOG #onetest com.jogamp.common.net.TestUri03Resolving 2>&1 | tee -a $LOG -onetest com.jogamp.common.net.TestUri99LaunchOnReservedCharPathBug908 2>&1 | tee -a $LOG +#onetest com.jogamp.common.net.TestUri99LaunchOnReservedCharPathBug908 2>&1 | tee -a $LOG #onetest com.jogamp.common.net.TestAssetURLConnectionUnregistered 2>&1 | tee -a $LOG #onetest com.jogamp.common.net.TestAssetURLConnectionRegistered 2>&1 | tee -a $LOG #onetest com.jogamp.junit.sec.TestSecIOUtil01 2>&1 | tee -a $LOG diff --git a/src/java/com/jogamp/common/util/IOUtil.java b/src/java/com/jogamp/common/util/IOUtil.java index e9bf050..b4fb745 100644 --- a/src/java/com/jogamp/common/util/IOUtil.java +++ b/src/java/com/jogamp/common/util/IOUtil.java @@ -800,6 +800,14 @@ public class IOUtil { return "#!/bin/true"+PlatformPropsImpl.NEWLINE; } } + private static String getExeNativePath(final String canonicalPath) { + switch(PlatformPropsImpl.OS_TYPE) { + case WINDOWS: + return "\""+canonicalPath+"\""; + default: + return canonicalPath; + } + } private static String[] getExeTestCommandArgs(final String scriptFile) { switch(PlatformPropsImpl.OS_TYPE) { case WINDOWS: @@ -1045,7 +1053,7 @@ public class IOUtil { existingExe = false; fillExeTestFile(exeTestFile); } - exeNativePath = "\""+exeTestFile.getCanonicalPath()+"\""; + exeNativePath = getExeNativePath( exeTestFile.getCanonicalPath() ); } catch (final SecurityException se) { throw se; // fwd Security exception } catch (final IOException e) { |