From efcc61b5788389b32b643a91698aa175e44bfd10 Mon Sep 17 00:00:00 2001 From: MeexReay Date: Mon, 22 Apr 2024 13:28:45 +0300 Subject: [PATCH] browse file directory exception --- .../themixray/repeating/mod/widget/RecordWidget.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/themixray/repeating/mod/widget/RecordWidget.java b/src/main/java/themixray/repeating/mod/widget/RecordWidget.java index d8a2d21..21ce25f 100644 --- a/src/main/java/themixray/repeating/mod/widget/RecordWidget.java +++ b/src/main/java/themixray/repeating/mod/widget/RecordWidget.java @@ -104,9 +104,13 @@ public class RecordWidget implements Drawable, Widget { if (Desktop.isDesktopSupported()) { Desktop desk = Desktop.getDesktop(); try { - desk.browse(record.getFile().toURI()); - } catch (IOException e) { - throw new RuntimeException(e); + desk.browseFileDirectory(record.getFile()); + } catch (Exception e) { + try { + desk.browse(record.getFile().toURI()); + } catch (IOException ex) { + throw new RuntimeException(ex); + } } } }).dimensions(parent.getX() + getX() + 77,parent.getY() + getY() + 4 + 14, 38, 13).build();