Don't search the whole home directory for usable Firefoxes

This commit is contained in:
eyedeekay
2024-07-08 17:08:48 -04:00
parent ad61d69be0
commit 50de466282

View File

@ -608,11 +608,16 @@ public class I2PCommonBrowser {
} }
public File userHomeDir() { public File userHomeDir() {
File hd = new File(System.getProperty("user.dir")); File rd = new File(System.getProperty("user.dir"));
if (hd == null || !hd.exists()) { File hd = new File(System.getProperty("user.home"));
hd = new File(System.getProperty("user.home")); if (rd == null || !rd.exists()) {
if (hd == null || !hd.exists()) {
if (rd.getAbsolutePath().equals(hd.getAbsolutePath()))
return null;
}
return rd;
} }
logger.info("Runtime directory discovered at: " + hd); logger.info("Runtime directory discovered at: " + rd);
return hd; return rd;
} }
} }