File tree 1 file changed +3
-5
lines changed
src/main/java/net/ftb/util
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -525,7 +525,7 @@ public static void browse (String url) {
525
525
try {
526
526
if (Desktop .isDesktopSupported () && Desktop .getDesktop ().isSupported (Desktop .Action .BROWSE )) {
527
527
Desktop .getDesktop ().browse (new URI (url .replace (" " , "+" )));
528
- } else if (getCurrentOS () == OS .UNIX && ( new File ( "/usr/bin/xdg-open" ). exists () || new File ( "/usr/local/bin/xdg-open" ). exists ()) ) {
528
+ } else if (getCurrentOS () == OS .UNIX ) {
529
529
// Work-around to support non-GNOME Linux desktop environments with xdg-open installed
530
530
new ProcessBuilder ("xdg-open" , url ).start ();
531
531
} else {
@@ -549,9 +549,7 @@ public static void open (File path) {
549
549
Desktop .getDesktop ().open (path );
550
550
} else if (getCurrentOS () == OS .UNIX ) {
551
551
// Work-around to support non-GNOME Linux desktop environments with xdg-open installed
552
- if (new File ("/usr/bin/xdg-open" ).exists () || new File ("/usr/local/bin/xdg-open" ).exists ()) {
553
- new ProcessBuilder ("xdg-open" , path .toString ()).start ();
554
- }
552
+ new ProcessBuilder ("xdg-open" , path .toString ()).start ();
555
553
}
556
554
} catch (Exception e ) {
557
555
Logger .logError ("Could not open file" , e );
@@ -767,4 +765,4 @@ static interface Kernel32 extends Library {
767
765
public static Kernel32 INSTANCE = (Kernel32 ) Native .loadLibrary ("kernel32" , Kernel32 .class );
768
766
public int GetProcessId (Long hProcess );
769
767
}
770
- }
768
+ }
You can’t perform that action at this time.
0 commit comments