mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-02-19 15:46:17 -05:00
Use dekstop browse instead of open
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user