diff options
author | Damian Minkov <damencho@jitsi.org> | 2008-05-28 17:37:12 +0000 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2008-05-28 17:37:12 +0000 |
commit | ff99f94b5e00406b1673f04c75596393d4c97f86 (patch) | |
tree | d8f3319cc6ee71de72cd7b1064a7919042cc1721 /src/net/java/sip/communicator/launcher/SIPCommunicator.java | |
parent | 6f04ff33c55ae034bb0583fe382259049c013621 (diff) | |
download | jitsi-ff99f94b5e00406b1673f04c75596393d4c97f86.zip jitsi-ff99f94b5e00406b1673f04c75596393d4c97f86.tar.gz jitsi-ff99f94b5e00406b1673f04c75596393d4c97f86.tar.bz2 |
Allow setting custom sc_home_dir location.
Diffstat (limited to 'src/net/java/sip/communicator/launcher/SIPCommunicator.java')
-rw-r--r-- | src/net/java/sip/communicator/launcher/SIPCommunicator.java | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/src/net/java/sip/communicator/launcher/SIPCommunicator.java b/src/net/java/sip/communicator/launcher/SIPCommunicator.java index 2511512..4d27946 100644 --- a/src/net/java/sip/communicator/launcher/SIPCommunicator.java +++ b/src/net/java/sip/communicator/launcher/SIPCommunicator.java @@ -42,23 +42,29 @@ public class SIPCommunicator { String scDefultDirName = ".sip-communicator"; - String defaultAppDirName = - System.getProperty("user.home") + - File.separator + - scDefultDirName; - - if(new File(defaultAppDirName).exists()) - { - System.setProperty("net.java.sip.communicator.SC_HOME_DIR_LOCATION", - System.getProperty("user.home")); - System.setProperty("net.java.sip.communicator.SC_HOME_DIR_NAME", - scDefultDirName); - } - else + String scHomeDirLocation = + System.getProperty("net.java.sip.communicator.SC_HOME_DIR_LOCATION"); + + if(scHomeDirLocation == null) { - System.setProperty("net.java.sip.communicator.SC_HOME_DIR_LOCATION", - System.getProperty("user.home") + File.separator + - "Library" + File.separator + "Application Support"); + String defaultAppDirName = + System.getProperty("user.home") + + File.separator + + scDefultDirName; + + if(new File(defaultAppDirName).exists()) + { + System.setProperty("net.java.sip.communicator.SC_HOME_DIR_LOCATION", + System.getProperty("user.home")); + System.setProperty("net.java.sip.communicator.SC_HOME_DIR_NAME", + scDefultDirName); + } + else + { + System.setProperty("net.java.sip.communicator.SC_HOME_DIR_LOCATION", + System.getProperty("user.home") + File.separator + + "Library" + File.separator + "Application Support"); + } } } |