From e7ac6b284eb3515f552cba491c43efe75f0a4eba Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 11 Dec 2018 15:20:33 +0100 Subject: 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. --- src/java/com/jogamp/common/util/IOUtil.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') 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"); -- cgit v1.2.3