From d4c4c857965f918e62cce3afd8f8642610ed58e9 Mon Sep 17 00:00:00 2001 From: hades Date: Sat, 2 Apr 2022 13:10:04 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-69009=20mac=E6=96=B0=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=B8=8BgetSelectedFiles=E6=96=B9=E6=B3=95=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/ifilechooser/SwingFileChooser.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/ifilechooser/SwingFileChooser.java b/designer-base/src/main/java/com/fr/design/gui/ifilechooser/SwingFileChooser.java index 942c3430c1..47abaa8b67 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ifilechooser/SwingFileChooser.java +++ b/designer-base/src/main/java/com/fr/design/gui/ifilechooser/SwingFileChooser.java @@ -32,7 +32,11 @@ class SwingFileChooser implements FileChooserProvider { @Override public File[] getSelectedFiles() { - return fileChooser.getSelectedFiles(); + if (ArrayUtils.isNotEmpty(fileChooser.getSelectedFiles())) { + return fileChooser.getSelectedFiles(); + } else { + return new File[]{fileChooser.getSelectedFile()}; + } } @Override