aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2018-12-11 15:20:33 +0100
committerSven Gothel <[email protected]>2018-12-11 15:20:33 +0100
commite7ac6b284eb3515f552cba491c43efe75f0a4eba (patch)
tree6f9bf1cbb5259b4fb78016b3744da558bf4f2a8e /src/java/com/jogamp
parentf1eba171ddd887a2daa3dfa2ac90ac864c5b22d4 (diff)
Adding 'jogamp.gluegen.TestTempDirExec' property, allowing to disable testing executable of temp dir
This also avoids trying to unpack the test executable on Windows, which may cause a virus scanner to halt the process or otherwise cause issues.
Diffstat (limited to 'src/java/com/jogamp')
-rw-r--r--src/java/com/jogamp/common/util/IOUtil.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/java/com/jogamp/common/util/IOUtil.java b/src/java/com/jogamp/common/util/IOUtil.java
index 88542c4..b9a0a33 100644
--- a/src/java/com/jogamp/common/util/IOUtil.java
+++ b/src/java/com/jogamp/common/util/IOUtil.java
@@ -69,6 +69,12 @@ public class IOUtil {
/** Subdirectory within platform's temporary root directory where all JogAmp related temp files are being stored: {@code jogamp} */
public static final String tmpSubDir = "jogamp";
+ private static final String _TestTempDirExec = "jogamp.gluegen.TestTempDirExec";
+ private static final boolean testTempDirExec;
+ static {
+ testTempDirExec = PropertyAccess.getBooleanProperty(_TestTempDirExec, true, true);
+ }
+
private IOUtil() {}
/**
@@ -865,6 +871,12 @@ public class IOUtil {
public static boolean testDirExec(final File dir)
throws SecurityException
{
+ if( !testTempDirExec ) {
+ if(DEBUG) {
+ System.err.println("IOUtil.testDirExec: <"+dir.getAbsolutePath()+">: Disabled "+_TestTempDirExec);
+ }
+ return false;
+ }
if (!testFile(dir, true, true)) {
if(DEBUG) {
System.err.println("IOUtil.testDirExec: <"+dir.getAbsolutePath()+">: Not writeable dir");