pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1682696 - /pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/util/FileOpenSaveDialog.java
Date Sun, 31 May 2015 08:39:13 GMT
Author: tilman
Date: Sun May 31 08:39:13 2015
New Revision: 1682696

URL: http://svn.apache.org/r1682696
Log:
PDFBOX-2530: fix bug that caused file to be overwritten

Modified:
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/util/FileOpenSaveDialog.java

Modified: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/util/FileOpenSaveDialog.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/util/FileOpenSaveDialog.java?rev=1682696&r1=1682695&r2=1682696&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/util/FileOpenSaveDialog.java
(original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/util/FileOpenSaveDialog.java
Sun May 31 08:39:13 2015
@@ -46,13 +46,10 @@ public class FileOpenSaveDialog
                         "Do you want to overwrite?",
                         "File already exists",
                         JOptionPane.YES_NO_OPTION);
-                if (result == JOptionPane.YES_OPTION)
-                {
-                    super.approveSelection();
-                }
-                else
+                if (result != JOptionPane.YES_OPTION)
                 {
                     cancelSelection();
+                    return;
                 }
             }
             super.approveSelection();



Mime
View raw message