browse file directory exception
This commit is contained in:
parent
38dad10048
commit
efcc61b578
@ -103,10 +103,14 @@ public class RecordWidget implements Drawable, Widget {
|
||||
ButtonWidget export_button = ButtonWidget.builder(Text.translatable("text.repeating-mod.export"), (i) -> {
|
||||
if (Desktop.isDesktopSupported()) {
|
||||
Desktop desk = Desktop.getDesktop();
|
||||
try {
|
||||
desk.browseFileDirectory(record.getFile());
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
desk.browse(record.getFile().toURI());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}).dimensions(parent.getX() + getX() + 77,parent.getY() + getY() + 4 + 14, 38, 13).build();
|
||||
|
Loading…
Reference in New Issue
Block a user