aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/launcher/SIPCommunicator.java
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2008-05-28 13:09:58 +0000
committerDamian Minkov <damencho@jitsi.org>2008-05-28 13:09:58 +0000
commit2fa4239487a1c3ffaf9fb427298ea3ebcc754702 (patch)
tree00878547afad60471ae4140ceb1bc9ab484e0200 /src/net/java/sip/communicator/launcher/SIPCommunicator.java
parent2c111b0a89cacc1940816c6f3fa0d804a339a1f4 (diff)
downloadjitsi-2fa4239487a1c3ffaf9fb427298ea3ebcc754702.zip
jitsi-2fa4239487a1c3ffaf9fb427298ea3ebcc754702.tar.gz
jitsi-2fa4239487a1c3ffaf9fb427298ea3ebcc754702.tar.bz2
Moving folder for storing config on MacOS to user.home/Library......
Diffstat (limited to 'src/net/java/sip/communicator/launcher/SIPCommunicator.java')
-rw-r--r--src/net/java/sip/communicator/launcher/SIPCommunicator.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/launcher/SIPCommunicator.java b/src/net/java/sip/communicator/launcher/SIPCommunicator.java
index fe381ab..3dc2f71 100644
--- a/src/net/java/sip/communicator/launcher/SIPCommunicator.java
+++ b/src/net/java/sip/communicator/launcher/SIPCommunicator.java
@@ -7,6 +7,7 @@
package net.java.sip.communicator.launcher;
import java.awt.*;
+import java.io.*;
import org.apache.felix.main.*;
@@ -29,6 +30,31 @@ public class SIPCommunicator
String vmVendor = System.getProperty("java.vendor");
String osName = System.getProperty("os.name");
+ /**
+ * Check whether default config folder exists.
+ * If it exists we use it. Otherwise use the settings coming
+ * from system properties.
+ * This is done cause moving the config folder and preventing
+ * not using existing data for users already using default folder.
+ */
+ if (osName.startsWith("Mac"))
+ {
+ 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);
+ }
+ }
+
if (version.startsWith("1.4") || vmVendor.startsWith("Gnu"))
{
String os = "";