mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-10-17 04:19:14 +00:00
Use dekstop browse instead of open
This commit is contained in:
1 parent
b20d04682b
commit
c2e17cbe59
1 file changed
+3
-3
@@ -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