diff options
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java index 966a0708..a6f24c9e 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java @@ -218,10 +218,15 @@ public class OutputComposite extends StateComposite { if (!this.saveFailed && outputFolder != null && !outputFolder.trim().isEmpty()) { // Output folder configured, try to save there - if(!outputFolder.endsWith(File.separator)) { - outputFolder += File.separator; + File f = new File(outputFolder); + if (f.isDirectory()) { + if (!outputFolder.endsWith(File.separator)) { + outputFolder += File.separator; + } + outputFileName = outputFolder + proposedName; + } else { + outputFileName = outputFolder; } - outputFileName = outputFolder + proposedName; } else { // Ask user where to save |