2003/05/26 10:38:33
[org.ibex.core.git] / src / org / xwt / Resources.java
index c0240ca..a152bf8 100644 (file)
@@ -48,7 +48,9 @@ public class Resources {
     /** Load a directory as if it were an archive */
     public static synchronized void loadDirectory(File dir) throws IOException { loadDirectory(dir, ""); }
     private static synchronized void loadDirectory(File dir, String prefix) throws IOException {
-        new Static(prefix.replace(File.separatorChar, '.'));
+       String n = prefix.replace(File.separatorChar, '.');
+       if (n.endsWith(".")) n = n.substring(0, n.length() - 1);
+        new Static(n);
         String[] subfiles = dir.list();
         for(int i=0; i<subfiles.length; i++) {
             if (subfiles[i].equals("CVS") || !validResourceName(subfiles[i])) continue;