[Webfunds-commits] java/webfunds/client/util UpgradesManager.java

Ian Grigg iang@cypherpunks.ai
Sat, 14 Apr 2001 16:37:29 -0400 (AST)


iang        01/04/14 16:37:29

  Modified:    webfunds/client/util UpgradesManager.java
  Log:
  fixed copy(streams) bug, so plugins can now be downloaded for install

Revision  Changes    Path
1.9       +2 -34     java/webfunds/client/util/UpgradesManager.java

Index: UpgradesManager.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/util/UpgradesManager.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- UpgradesManager.java	2001/04/12 05:11:36	1.8
+++ UpgradesManager.java	2001/04/14 20:37:29	1.9
@@ -1,5 +1,5 @@
 /*
- * $Id: UpgradesManager.java,v 1.8 2001/04/12 05:11:36 iang Exp $
+ * $Id: UpgradesManager.java,v 1.9 2001/04/14 20:37:29 iang Exp $
  *
  * Copyright (c) 2000 Systemics Inc on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -487,38 +487,6 @@
             return ;
         }
 
-//        int next;
-//        try {
-//            next = is.available();
-//        } catch (IOException ex) {
-//            ui.errorMessage("URL " + url + " disconnected: " + ex);
-//            return ;
-//        }
-//
-//        while (next > 0)
-//        {
-//            try {
-//                byte[] buf = new byte[is.available()];
-//                is.read(buf);
-//                fos.write(buf);
-//                next = is.available();
-//            } catch (IOException ex) {
-//                ui.errorMessage("URL " + url + " download failed: " + ex);
-//                return ;
-//            }
-//        }
-//
-//        try {
-//            is.close();
-//        } catch (IOException ex) {
-//            logmsg("IOEx on close (ignored): " + ex);
-//        }
-//
-//        try {
-//            fos.close();
-//        } catch (IOException ex) {
-//            logmsg("IOEx on close (ignored): " + ex);
-//        }
         ui.infoMessage("URL " + url + " downloaded");
         refreshList();
     }
@@ -679,7 +647,7 @@
         byte[] buf = new byte[size];
 
         int offset = 0;
-        while (is.available() > 0)
+        while (is.available() >= 0)
         {
             int i;
             i = is.read(buf, offset, size - offset);