aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/util
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-11-28 10:14:03 +0100
committerSven Gothel <[email protected]>2023-11-28 10:14:03 +0100
commit0f731bfabcdd19665c3c09c5f40f898101c501c9 (patch)
tree3c641b65227a7ef7d52fa4e96e22c94e34e2ee91 /src/java/com/jogamp/common/util
parentc8cb87e17a14281a9d0e2f311b8534ecb7ac00b4 (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.
Diffstat (limited to 'src/java/com/jogamp/common/util')
-rw-r--r--src/java/com/jogamp/common/util/IOUtil.java10
1 files changed, 9 insertions, 1 deletions
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) {