2003/04/10 01:41:43
[org.ibex.core.git] / src / org / xwt / Resources.java
index d525ad0..59884c9 100644 (file)
@@ -4,7 +4,7 @@ package org.xwt;
 import java.io.*;
 import java.net.*;
 import java.util.*;
-import jazz.*;
+import java.util.zip.*;
 import java.lang.*;
 import java.applet.*;
 import org.mozilla.javascript.*;
@@ -39,9 +39,8 @@ public class Resources {
             char c = name.charAt(i);
             if (!((c >= 'A' && c <= 'Z') ||
                   (c >= 'a' && c <= 'z') ||
-                  c == '_' ||
-                  (c >= '0' && c <= '9') ||
-                  (c == '.' && i == name.length() - 4))) return false;
+                  c == '_' || c == '.' || 
+                  (c >= '0' && c <= '9'))) return false;
         }
         return true;
     }
@@ -84,7 +83,6 @@ public class Resources {
                 }
                 public int read(byte[] b, int off, int len) throws IOException {
                     int ret = super.read(b, off, len);
-                    if (ret != -1) bytesDownloaded += ret;
                     if (clear && callback != null) {
                         clear = false;
                         ThreadMessage.newthread(new JSObject.JSFunction() {
@@ -98,6 +96,7 @@ public class Resources {
                                 }                            
                             });
                     }
+                    bytesDownloaded += ret;
                     return ret;
                 }
             });