diff --git a/runelite-client/src/main/java/net/runelite/client/util/LinkBrowser.java b/runelite-client/src/main/java/net/runelite/client/util/LinkBrowser.java index e8965029c1..07ac4a2d87 100644 --- a/runelite-client/src/main/java/net/runelite/client/util/LinkBrowser.java +++ b/runelite-client/src/main/java/net/runelite/client/util/LinkBrowser.java @@ -60,17 +60,17 @@ public class LinkBrowser return; } - if (attemptDesktopBrowse(url)) - { - log.debug("Opened url through Desktop#browse to {}", url); - return; - } - if (shouldAttemptXdg && attemptXdgOpen(url)) { log.debug("Opened url through xdg-open to {}", url); return; } + + if (attemptDesktopBrowse(url)) + { + log.debug("Opened url through Desktop#browse to {}", url); + return; + } log.warn("LinkBrowser.browse() could not open {}", url); showMessageBox("Unable to open link. Press 'OK' and the link will be copied to your clipboard.", url); @@ -91,18 +91,18 @@ public class LinkBrowser return; } + if (shouldAttemptXdg && attemptXdgOpen(directory)) + { + log.debug("Opened directory through xdg-open to {}", directory); + return; + } + if (attemptDesktopOpen(directory)) { log.debug("Opened directory through Desktop#open to {}", directory); return; } - if (shouldAttemptXdg && attemptXdgOpen(directory)) - { - log.debug("Opened directory through xdg-open to {}", directory); - return; - } - log.warn("LinkBrowser.open() could not open {}", directory); showMessageBox("Unable to open folder. Press 'OK' and the folder directory will be copied to your clipboard.", directory); }).start();