X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FResources.java;h=59884c9d6801805fb128f8aaa62bf3a448be063c;hb=2b9f73a3d850503353fab448c6bbfe7f70efdfbe;hp=d525ad094c6038c609b4d7a7ccaa4354d2216bbe;hpb=ad7d057ea80d61610f4b8729919384a979f389a2;p=org.ibex.core.git diff --git a/src/org/xwt/Resources.java b/src/org/xwt/Resources.java index d525ad0..59884c9 100644 --- a/src/org/xwt/Resources.java +++ b/src/org/xwt/Resources.java @@ -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; } });