mirror of
https://github.com/RetGal/Dayon.git
synced 2024-10-04 10:27:37 +03:00
Restrict browser command
This commit is contained in:
parent
4613bdc45c
commit
a5fcee57ec
@ -1,2 +1,4 @@
|
||||
#!/bin/sh
|
||||
exec snapctl user-open "$@"
|
||||
case "$@" in http*://)
|
||||
snapctl user-open "$@"
|
||||
esac
|
||||
|
@ -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("/snap/bin/dayon.browser", getQuickStartURI(FrameType.ASSISTANT).toString()).start();
|
||||
} catch (URISyntaxException | IOException ex) {
|
||||
Log.warn("Help Error!", ex);
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ public abstract class BaseFrame extends JFrame {
|
||||
private static void browse(URI uri) {
|
||||
try {
|
||||
if (isSnapped()) {
|
||||
new ProcessBuilder("dayon.browser", uri.toString()).start();
|
||||
new ProcessBuilder("/snap/bin/dayon.browser", uri.toString()).start();
|
||||
} else if (Desktop.isDesktopSupported()) {
|
||||
final Desktop desktop = Desktop.getDesktop();
|
||||
if (desktop.isSupported(Desktop.Action.BROWSE)) {
|
||||
|
Loading…
Reference in New Issue
Block a user