From 745901131e37629d75560c22bd483b677f3a1296 Mon Sep 17 00:00:00 2001 From: Branislav Stojkovic Date: Sun, 16 Dec 2018 10:44:41 +0100 Subject: [PATCH] File chooser dialogs don't append file extension if folder path has a dot character in it --- diylc/diylc-swing/src/org/diylc/swing/gui/DialogFactory.java | 2 +- diylc/diylc-swing/update.xml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/diylc/diylc-swing/src/org/diylc/swing/gui/DialogFactory.java b/diylc/diylc-swing/src/org/diylc/swing/gui/DialogFactory.java index 5890df34..59d44385 100644 --- a/diylc/diylc-swing/src/org/diylc/swing/gui/DialogFactory.java +++ b/diylc/diylc-swing/src/org/diylc/swing/gui/DialogFactory.java @@ -158,7 +158,7 @@ public class DialogFactory { if (result == JFileChooser.APPROVE_OPTION) { lastDirectory = fileChooser.getCurrentDirectory(); ConfigurationManager.getInstance().writeValue(PATH_KEY, lastDirectory.getAbsolutePath()); - if (fileChooser.getSelectedFile().getAbsolutePath().contains(".")) { + if (fileChooser.getSelectedFile().getName().contains(".")) { return fileChooser.getSelectedFile(); } else { return new File(fileChooser.getSelectedFile().getAbsoluteFile() + "." + defaultExtension); diff --git a/diylc/diylc-swing/update.xml b/diylc/diylc-swing/update.xml index 800b7acc..7fb85d27 100644 --- a/diylc/diylc-swing/update.xml +++ b/diylc/diylc-swing/update.xml @@ -1890,6 +1890,10 @@ IMPROVEMENT Preserve z-order of components when copy-pasting + + BUG_FIX + File chooser dialogs don't append file extension if folder path has a dot character in it + BUG_FIX "Cut Line" component sometimes disappears