mirror of
https://github.com/RetGal/Dayon.git
synced 2024-10-04 10:27:37 +03:00
Snap specific browser with absolute path
This commit is contained in:
parent
27fb12fb45
commit
a925a0acc5
@ -273,7 +273,7 @@ public class Assistant implements Configurable<AssistantConfiguration>, Clipboar
|
||||
help.addActionListener(ev1 -> {
|
||||
if (isSnapped()) {
|
||||
try {
|
||||
new ProcessBuilder("dayon.browser", getQuickStartURI(FrameType.ASSISTANT).toString()).start();
|
||||
new ProcessBuilder(getSnapBrowserCommand(), getQuickStartURI(FrameType.ASSISTANT).toString()).start();
|
||||
} catch (URISyntaxException | IOException ex) {
|
||||
Log.warn("Help Error!", ex);
|
||||
}
|
||||
|
@ -206,6 +206,9 @@ public abstract class SystemUtilities {
|
||||
return System.getProperty("java.class.path").startsWith("/snap/");
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the absolute path to dayon.browser
|
||||
*/
|
||||
public static String getSnapBrowserCommand() {
|
||||
String cp = System.getProperty("java.class.path");
|
||||
return cp.substring(0, cp.indexOf("jar")) + "bin/dayon.browser";
|
||||
|
Loading…
Reference in New Issue
Block a user