[Webfunds-commits] java/webfunds/store SepFileStore.java

Ian Grigg iang@cypherpunks.ai
Mon, 2 Oct 2000 10:13:19 -0400 (AST)


iang        00/10/02 10:13:19

  Modified:    webfunds/client/plugins WalletManager.java
               webfunds/store SepFileStore.java
  Log:
  minor cleaning, one bug with directory creation

Revision  Changes    Path
1.4       +2 -1      java/webfunds/client/plugins/WalletManager.java

Index: WalletManager.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/plugins/WalletManager.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WalletManager.java	2000/09/30 18:50:09	1.3
+++ WalletManager.java	2000/10/02 14:13:18	1.4
@@ -1,5 +1,5 @@
 /*
- * $Id: WalletManager.java,v 1.3 2000/09/30 18:50:09 iang Exp $
+ * $Id: WalletManager.java,v 1.4 2000/10/02 14:13:18 iang Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -288,6 +288,7 @@
         }
         catch (Throwable ex)
         {
+            ex.printStackTrace();
             throw new PluginException("Fatal Wallet: " + ex);
         }
 



1.43      +16 -8     java/webfunds/store/SepFileStore.java

Index: SepFileStore.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/store/SepFileStore.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- SepFileStore.java	2000/09/30 18:08:25	1.42
+++ SepFileStore.java	2000/10/02 14:13:19	1.43
@@ -1,5 +1,5 @@
 /*
- * $Id: SepFileStore.java,v 1.42 2000/09/30 18:08:25 iang Exp $
+ * $Id: SepFileStore.java,v 1.43 2000/10/02 14:13:19 iang Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -132,10 +132,9 @@
     {
         setSync(false);
         String[] files = dir.list();
-        File file = null;
         for (int i = 0; i < files.length; i++)
         {
-            file = new File(dir, files[i]);
+            File file = new File(dir, files[i]);
             readFile(file);
         }
         setSync(true);
@@ -320,13 +319,15 @@
 
     protected Store getOldStore(String name)
     {
-        File d = new File(dir, name);
         SepFileStore st; //  = getInstance(d, bug, fix);
-        checkDir(d);
         st = new SepFileStore();
 //        st.setCore(c);
 logmsg(name + ": setting (OLD) class loader " + getClassLoader());
         st.setClassLoader(getClassLoader());
+
+        // this needs cleaning up...
+        File d = new File(dir, name);
+        checkDir(d);
         st.init(d, bug, fix);
         st.initFiles();
         stores.put(name, st);
@@ -372,7 +373,11 @@
         st = new AppendFileStore();
 logmsg("(APPEND) has class loader " + st.getClassLoader());
         st.setClassLoader(getClassLoader());
-        st.init(new File(dir, name), bug, fix);
+
+        // this needs cleaning up...
+        File d = new File(dir, name);
+        checkDir(d);
+        st.init(d, bug, fix);
         //st.setCore(c);
         stores.put(name, st);
         return st;
@@ -428,8 +433,11 @@
 logmsg("instantiated: " + st.getClass() + " with " + cl4);
         st.setClassLoader(cl);
 
-        st.init(new File(dir, name), bug, " (cl): ");
-logmsg("init()d");
+        // this needs cleaning up...
+        File d = new File(dir, name);
+        checkDir(d);
+        st.init(d, bug, " (cl): ");
+logmsg("init()ed");
         st.initFiles();
 logmsg("initFiles()d");
         return st;