changeset 1414:a066aa4c05fc

* netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java (find) for windows, using different path firefox profile
author Jiri Vanek <jvanek@redhat.com>
date Tue, 02 May 2017 15:42:35 +0200
parents 1a6d7e45b0c8
children 0c05ca429063
files AUTHORS ChangeLog netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java
diffstat 3 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/AUTHORS	Tue May 02 10:34:49 2017 +0200
+++ b/AUTHORS	Tue May 02 15:42:35 2017 +0200
@@ -4,6 +4,7 @@
 Lillian Angel <langel@redhat.com>
 Andrew Azores <aazores@redhat.com>
 Deepak Bhole <dbhole@redhat.com>
+Adam Buchta <adbuch7@gmail.com>
 Ricardo Martín Camarero <rickyepoderi@yahoo.es>
 Marcin Cieslak <marcin.cieslak@gmail.com>
 Danesh Dadachanji <ddadacha@redhat.com>
--- a/ChangeLog	Tue May 02 10:34:49 2017 +0200
+++ b/ChangeLog	Tue May 02 15:42:35 2017 +0200
@@ -1,3 +1,10 @@
+2017-05-02  Adam Buchta  <adbuch7@gmail.com>
+            Jiri Vanek <jvanek@redhat.com>
+
+	* AUTHORS: added Adam Buchta to authors
+	* netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java
+	(find) for windows, using different path firefox profile
+
 2017-05-02  Jiri Vanek <jvanek@redhat.com>
 
 	* launcher/launchers.bat.in: added 	INST_ITW_HOME=%~dp0/../ as default location for windows CP search
--- a/netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java	Tue May 02 10:34:49 2017 +0200
+++ b/netx/net/sourceforge/jnlp/browser/FirefoxPreferencesFinder.java	Tue May 02 15:42:35 2017 +0200
@@ -44,6 +44,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
 import net.sourceforge.jnlp.util.logging.OutputController;
@@ -66,6 +67,17 @@
         String configPath = System.getProperty("user.home") + File.separator + ".mozilla"
                 + File.separator + "firefox" + File.separator;
 
+        if (JNLPRuntime.isWindows()) {
+            Map<String, String> env = System.getenv();
+            if (env != null) {
+                String appdata = env.get("APPDATA");
+                if (appdata != null) {
+                    configPath = appdata + File.separator + "Mozilla"
+                            + File.separator + "Firefox" + File.separator;
+                }
+            }
+        }
+
         String profilesPath = configPath + "profiles.ini";
 
         if (!(new File(profilesPath).isFile())) {