diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:35:51 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:35:51 +0000 |
commit | b6ad34e44b3aedce7134a6bc79cb5b16e1f21617 (patch) | |
tree | 2386f75c19dc6c5481dddd9c3578d6f726a9ac31 /pdf-over-gui | |
parent | 432b4952f3ec5e77f485ef03751799193fa881b4 (diff) | |
download | mocca-b6ad34e44b3aedce7134a6bc79cb5b16e1f21617.tar.gz mocca-b6ad34e44b3aedce7134a6bc79cb5b16e1f21617.tar.bz2 mocca-b6ad34e44b3aedce7134a6bc79cb5b16e1f21617.zip |
Allow to set output filename
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@403 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui')
-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 |