You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/09/24 10:07:47 UTC
svn commit: r818397 -
/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Loader.java
Author: mturk
Date: Thu Sep 24 08:07:47 2009
New Revision: 818397
URL: http://svn.apache.org/viewvc?rev=818397&view=rev
Log:
Create DataModel subdir for platforms that allow both 32 and 64 bit JVM versions
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Loader.java
Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Loader.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Loader.java?rev=818397&r1=818396&r2=818397&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Loader.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Loader.java Thu Sep 24 08:07:47 2009
@@ -85,7 +85,7 @@
* Get the path to temporary location for extracting the
* libraries from resource.
*/
- public static File libFile(String name)
+ public static File libFile(String name, boolean arch)
{
synchronized(Loader.class) {
if (path == null) {
@@ -100,10 +100,22 @@
*/
path.deleteOnExit();
}
+ if (arch) {
+ path = new File(path, SystemId.getDataModel());
+ if (path.mkdir()) {
+ path.deleteOnExit();
+ }
+ }
}
else {
path = Utils.createTempDirectory("_acr-");
path.deleteOnExit();
+ if (arch) {
+ path = new File(path, SystemId.getDataModel());
+ if (path.mkdir()) {
+ path.deleteOnExit();
+ }
+ }
}
} catch (Exception io) {
// Cannot create temp dir