[Webfunds-commits] java/webfunds/client/contracts/wizard FinishSig.java

Edwin Woudt edwin@cypherpunks.ai
Mon, 21 Aug 2000 11:22:33 -0400 (AST)


edwin       00/08/21 11:22:32

  Modified:    webfunds/client/contracts/wizard FinishSig.java
  Log:
  Untested fix for my JDK 1.1 breakage (I need to download swing first :(

Revision  Changes    Path
1.7       +8 -10     java/webfunds/client/contracts/wizard/FinishSig.java

Index: FinishSig.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/contracts/wizard/FinishSig.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- FinishSig.java	2000/08/21 08:24:20	1.6
+++ FinishSig.java	2000/08/21 15:22:32	1.7
@@ -1,5 +1,5 @@
 /*
- * $Id: FinishSig.java,v 1.6 2000/08/21 08:24:20 edwin Exp $
+ * $Id: FinishSig.java,v 1.7 2000/08/21 15:22:32 edwin Exp $
  *
  * Copyright (c) Systemics Inc 2000 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -36,7 +36,7 @@
  * Panel that does the actual signing.
  *
  * @author Edwin Woudt <edwin@webfunds.org>
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
  */
 
 public class FinishSig extends WizardPanel 
@@ -293,10 +293,9 @@
             if (!confirm("File "+n+" already exists! Overwrite?")) return false;
         } else {
             try {
-                if (!f.createNewFile()) {
-                    error("Could not create output file "+n+".", null);
-                    return false;
-                }
+                FileOutputStream fos = new FileOutputStream(f);
+                fos.write(0);
+                fos.close();
             } catch (IOException ioe) {
                 error("Could not create output file"+n+".", ioe);
                 return false;
@@ -313,10 +312,9 @@
                     return false;
             } else {
                 try {
-                    if (!f.createNewFile()) {
-                        error("Could not create output file "+n+".", null);
-                        return false;
-                    }
+                    FileOutputStream fos = new FileOutputStream(f);
+                    fos.write(0);
+                    fos.close();
                 } catch (IOException ioe) {
                     error("Could not create output file"+n+".", ioe);
                     return false;