summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-03-06 21:47:15 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-03-06 21:47:15 +0000
commite526f246a6d2ff674975bbdd2a6a36d4cba71d57 (patch)
tree2a120c0577d6d23db43710bc531238bec3c473be /java/sca/modules
parent093fcdb0a7125ec9767592c16882e1fe3a993b3c (diff)
Make sure the default configuration folder is isolated by user names
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@751090 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules')
-rw-r--r--java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
index bef3230181..7cc103a687 100644
--- a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
+++ b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
@@ -159,7 +159,15 @@ public class EquinoxHost {
// Set location properties
// FIXME Use proper locations
String tmpDir = getSystemProperty("java.io.tmpdir");
- File root = new File(tmpDir, ".tuscany/equinox/" + UUID.randomUUID().toString());
+ File root = new File(tmpDir);
+ // Add user name as the prefix. For multiple users on the same Lunix,
+ // there will be permission issue if one user creates the .tuscany folder
+ // first under /tmp with no write permission for others.
+ String userName = getSystemProperty("user.name");
+ if (userName != null) {
+ root = new File(root, userName);
+ }
+ root = new File(root, ".tuscany/equinox/" + UUID.randomUUID().toString());
if (logger.isLoggable(Level.FINE)) {
logger.fine("Equinox location: " + root);
}