mirror of
https://github.com/SKCraft/Launcher.git
synced 2024-11-24 12:16:28 +01:00
Fixed directory opening.
This commit is contained in:
parent
170ee65f4f
commit
3ead0c5445
@ -67,11 +67,10 @@ public final class SwingHelper {
|
|||||||
|
|
||||||
public static void browseDir(File file, Component component) {
|
public static void browseDir(File file, Component component) {
|
||||||
try {
|
try {
|
||||||
Desktop.getDesktop().browse(new URL("file://" + file.getAbsolutePath()).toURI());
|
Desktop.getDesktop().open(file);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
JOptionPane.showMessageDialog(component, _("errors.openDirError", file.getAbsolutePath()),
|
JOptionPane.showMessageDialog(component, _("errors.openDirError", file.getAbsolutePath()),
|
||||||
_("errorTitle"), JOptionPane.ERROR_MESSAGE);
|
_("errorTitle"), JOptionPane.ERROR_MESSAGE);
|
||||||
} catch (URISyntaxException e) {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user