[armedbear-cvs] r12344 - trunk/abcl/src/org/armedbear/lisp

Alessio Stalla astalla at common-lisp.net
Fri Jan 8 19:02:45 UTC 2010


Author: astalla
Date: Fri Jan  8 14:02:42 2010
New Revision: 12344

Log:
Fixed loading of compressed FASLs (.abcl) from jar files when the FASL is in a subdirectory.


Modified:
   trunk/abcl/src/org/armedbear/lisp/Load.java

Modified: trunk/abcl/src/org/armedbear/lisp/Load.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Load.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Load.java	Fri Jan  8 14:02:42 2010
@@ -227,7 +227,11 @@
                 // have to decompress it first, and seek for the '._'
                 // init FASL.
                 int i = zipEntryName.lastIndexOf('.');
-                String subZipEntryName = zipEntryName.substring(0, i).concat("._");
+		int j = zipEntryName.lastIndexOf('/');
+		if(j >= i) {
+		    return error(new LispError("Invalid zip entry name: " + zipEntryName));
+		}
+                String subZipEntryName = zipEntryName.substring(j + 1, i).concat("._");
                 in = Utilities.getZippedZipEntryAsInputStream(zipfile, 
                                                               zipEntryName, 
                                                               subZipEntryName);




More information about the armedbear-cvs mailing list