Use dekstop browse instead of open

This commit is contained in:
crschnick
2026-02-09 13:21:16 +00:00
parent b20d04682b
commit c2e17cbe59

View File

@@ -61,7 +61,7 @@ public class DesktopHelper {
return;
}
if (!Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
if (!Desktop.getDesktop().isSupported(Desktop.Action.OPEN)) {
if (OsType.ofLocal() == OsType.LINUX) {
LocalExec.readStdoutIfPossible("xdg-open", file.toString());
return;
@@ -70,9 +70,9 @@ public class DesktopHelper {
// This can be a blocking operation
ThreadHelper.runAsync(() -> {
if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
if (Desktop.getDesktop().isSupported(Desktop.Action.OPEN)) {
try {
Desktop.getDesktop().browse(file.toFile().toURI());
Desktop.getDesktop().open(file.toFile());
return;
} catch (Exception e) {
// Some basic linux systems have trouble with the API call