From 1468286bf569a493e4fdb887d5f3732f88c8cec3 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 16 Jun 2012 05:31:47 +0200 Subject: Fix Bug 587: Use alternative storage location if platform's temp directory is mounted w/ noexec ; IOUtil API change! Test whether executable files can be launched in temporary folder by trying to run an empty executable file - if !( WINDOWS | OPENKODE ) TempDir: 1) ${java.io.tmpdir}/jogamp 2) $XDG_CACHE_HOME/jogamp - if !( ANDROID | MACOS | WINDOWS | OPENKODE ) 3) $HOME/.jogamp $XDG_CACHE_HOME defaults to $HOME/.cache - TempFileCache: ${TempDir}/file_cache -> ${java.io.tmpdir}/jogamp/file_cache - LauncherTempFileCache: ${TempDir}/file_cache -> ${java.io.tmpdir}/jogamp/file_cache +++ AndroidUtils*.getTempRoot(): Remove unused AccessControlContext param --- src/java/jogamp/android/launcher/LauncherTempFileCache.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/java/jogamp/android/launcher/LauncherTempFileCache.java') diff --git a/src/java/jogamp/android/launcher/LauncherTempFileCache.java b/src/java/jogamp/android/launcher/LauncherTempFileCache.java index 06b8516..7e566c9 100644 --- a/src/java/jogamp/android/launcher/LauncherTempFileCache.java +++ b/src/java/jogamp/android/launcher/LauncherTempFileCache.java @@ -40,7 +40,8 @@ public class LauncherTempFileCache { private static final boolean DEBUG = true; // Lifecycle: For all JVMs, ClassLoader and times. - private static final String tmpDirPrefix = "jogamp.tmp.cache"; + private static final String tmpSubDir = "jogamp"; + private static final String tmpDirPrefix = "file_cache"; // Get the value of the tmproot system property // Lifecycle: For all JVMs and ClassLoader @@ -143,13 +144,13 @@ public class LauncherTempFileCache { // Get the name of the tmpbase directory. { final File tmpRoot = ctx.getDir("temp", Context.MODE_WORLD_READABLE); - tmpBaseDir = new File(tmpRoot, tmpDirPrefix); + tmpBaseDir = new File(new File(tmpRoot, tmpSubDir), tmpDirPrefix); } tmpRootPropValue = System.getProperty(tmpRootPropName); if (tmpRootPropValue == null) { // Create the tmpbase directory if it doesn't already exist - tmpBaseDir.mkdir(); + tmpBaseDir.mkdirs(); if (!tmpBaseDir.isDirectory()) { throw new IOException("Cannot create directory " + tmpBaseDir); } -- cgit v1.2.3