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

Edwin Woudt edwin@cypherpunks.ai
Mon, 21 Aug 2000 13:05:04 -0400 (AST)


edwin       00/08/21 13:05:04

  Modified:    webfunds/client/contracts/wizard ContractFile.java
                        FinishSig.java KeyPanel.java
  Log:
  Backout changes to get relative paths working.
  Apparently this has been working all the time, but it was reported as a bug.
  My fix to this bug broke absolute paths on unix.

Revision  Changes    Path
1.4       +3 -3      java/webfunds/client/contracts/wizard/ContractFile.java

Index: ContractFile.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/contracts/wizard/ContractFile.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ContractFile.java	2000/08/21 08:24:20	1.3
+++ ContractFile.java	2000/08/21 17:05:03	1.4
@@ -1,5 +1,5 @@
 /*
- * $Id: ContractFile.java,v 1.3 2000/08/21 08:24:20 edwin Exp $
+ * $Id: ContractFile.java,v 1.4 2000/08/21 17:05:03 edwin Exp $
  *
  * Copyright (c) Systemics Inc 2000 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -23,7 +23,7 @@
  * Panel that asks for the filename of the contract.
  *
  * @author Edwin Woudt <edwin@webfunds.org>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
  */
 
 public class ContractFile extends WizardPanel 
@@ -159,7 +159,7 @@
         if (!txtFile.getText().equals("")) {
             try {
                 String filename = txtFile.getText();
-                File f = new File(System.getProperty("user.dir"), filename);
+                File f = new File(filename);
                 FileInputStream fis = new FileInputStream(f);
                 DataInputStream dis = new DataInputStream(fis);
                 



1.8       +6 -7      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.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FinishSig.java	2000/08/21 15:22:32	1.7
+++ FinishSig.java	2000/08/21 17:05:03	1.8
@@ -1,5 +1,5 @@
 /*
- * $Id: FinishSig.java,v 1.7 2000/08/21 15:22:32 edwin Exp $
+ * $Id: FinishSig.java,v 1.8 2000/08/21 17:05:03 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.7 $
+ * @version $Revision: 1.8 $
  */
 
 public class FinishSig extends WizardPanel 
@@ -288,7 +288,7 @@
         
         // test for validness of signed contract output file
         String n = txtFile.getText();
-        File f = new File(System.getProperty("user.dir"), n);
+        File f = new File(n);
         if (f.exists()) {
             if (!confirm("File "+n+" already exists! Overwrite?")) return false;
         } else {
@@ -306,7 +306,7 @@
         // test for validness of unsigned contract output file
         n = txtFileUnsigned.getText();
         if (! n.equals("")) {
-            f = new File(System.getProperty("user.dir"), n);
+            f = new File(n);
             if (f.exists()) {
                 if (!confirm("File "+n+" already exists! Overwrite?")) 
                     return false;
@@ -393,7 +393,7 @@
             
         // write the signed contract
         try {
-            f = new File(System.getProperty("user.dir"),txtFile.getText());
+            f = new File(txtFile.getText());
             FileOutputStream fos = new FileOutputStream(f);
             DataOutputStream dos = new DataOutputStream(fos);
             dos.write(signedBytes);
@@ -407,8 +407,7 @@
         // write the unsigned contract
         if (! txtFileUnsigned.getText().equals("")) {
             try {
-                f = new File(System.getProperty("user.dir"), 
-                                                     txtFileUnsigned.getText());
+                f = new File(txtFileUnsigned.getText());
                 FileOutputStream fos = new FileOutputStream(f);
                 DataOutputStream dos = new DataOutputStream(fos);
                 dos.write(data.getUnsignedContract().getBytes("ISO8859-1"));



1.4       +3 -4      java/webfunds/client/contracts/wizard/KeyPanel.java

Index: KeyPanel.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/contracts/wizard/KeyPanel.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- KeyPanel.java	2000/08/21 08:24:20	1.3
+++ KeyPanel.java	2000/08/21 17:05:03	1.4
@@ -1,5 +1,5 @@
 /*
- * $Id: KeyPanel.java,v 1.3 2000/08/21 08:24:20 edwin Exp $
+ * $Id: KeyPanel.java,v 1.4 2000/08/21 17:05:03 edwin Exp $
  *
  * Copyright (c) Systemics Inc 2000 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -29,7 +29,7 @@
  * Abstract superclass for all panels in a wizard.
  *
  * @author Edwin Woudt <edwin@webfunds.org>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
  */
 
 public abstract class KeyPanel extends WizardPanel {
@@ -41,8 +41,7 @@
             // read file
             String key;
             try {
-                // open file relative to current dir
-                File f = new File(System.getProperty("user.dir"), filename);
+                File f = new File(filename);
                 FileInputStream fis = new FileInputStream(f);
                 DataInputStream dis = new DataInputStream(fis);