[armedbear-cvs] r12550 - trunk/abcl/src/org/armedbear/lisp
Mark Evenson
mevenson at common-lisp.net
Tue Mar 16 15:20:03 UTC 2010
Author: mevenson
Date: Tue Mar 16 11:20:01 2010
New Revision: 12550
Log:
Fix loading of packed FASLs which have been renamed.
Bug was present since at least 0.18.1.
Modified:
trunk/abcl/src/org/armedbear/lisp/Load.java
trunk/abcl/src/org/armedbear/lisp/Pathname.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 Tue Mar 16 11:20:01 2010
@@ -163,16 +163,28 @@
mergedPathname = new Pathname(n);
LispObject initTruename = Pathname.truename(mergedPathname);
if (initTruename == null || initTruename.equals(NIL)) {
- String errorMessage
- = "Loadable FASL not found for"
- + "'" + pathname + "'"
- + " in "
- + "'" + mergedPathname + "'";
- if (ifDoesNotExist) {
- return error(new FileError(errorMessage, mergedPathname));
+ // Maybe the enclosing JAR has been renamed?
+ Pathname p = new Pathname(mergedPathname);
+ p.name = Keyword.WILD;
+ p.invalidateNamestring();
+ LispObject result = Pathname.MATCH_WILD_JAR_PATHNAME.execute(p);
+
+ if (result instanceof Cons
+ && ((Cons)result).length() == 1
+ && ((Cons)result).car() instanceof Pathname) {
+ initTruename = (Pathname)result.car();
} else {
- Debug.trace(errorMessage);
- return NIL;
+ String errorMessage
+ = "Loadable FASL not found for "
+ + "'" + pathname + "'"
+ + " in "
+ + "'" + mergedPathname + "'";
+ if (ifDoesNotExist) {
+ return error(new FileError(errorMessage, mergedPathname));
+ } else {
+ Debug.trace(errorMessage);
+ return NIL;
+ }
}
}
truename = (Pathname)initTruename;
Modified: trunk/abcl/src/org/armedbear/lisp/Pathname.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Pathname.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Pathname.java Tue Mar 16 11:20:01 2010
@@ -1357,7 +1357,7 @@
}
// ### match-wild-jar-pathname wild-jar-pathname
- private static final Primitive LIST_JAR_DIRECTORY = new pf_match_wild_jar_pathname();
+ static final Primitive MATCH_WILD_JAR_PATHNAME = new pf_match_wild_jar_pathname();
private static class pf_match_wild_jar_pathname extends Primitive {
pf_match_wild_jar_pathname() {
super("match-wild-jar-pathname", PACKAGE_SYS, false, "wild-jar-pathname");
More information about the armedbear-cvs
mailing list