Changeset 12550


Ignore:
Timestamp:
03/16/10 15:20:01 (11 years ago)
Author:
Mark Evenson
Message:

Fix loading of packed FASLs which have been renamed.

Bug was present since at least 0.18.1.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Load.java

    r12524 r12550  
    164164            LispObject initTruename = Pathname.truename(mergedPathname);
    165165            if (initTruename == null || initTruename.equals(NIL)) {
    166                 String errorMessage
    167                     = "Loadable FASL not found for"
    168                     + "'" + pathname + "'"
    169                     + " in "
    170                     + "'" + mergedPathname + "'";
    171                 if (ifDoesNotExist) {
    172                     return error(new FileError(errorMessage, mergedPathname));
     166                // Maybe the enclosing JAR has been renamed?
     167                Pathname p = new Pathname(mergedPathname);
     168                p.name = Keyword.WILD;
     169                p.invalidateNamestring();
     170                LispObject result = Pathname.MATCH_WILD_JAR_PATHNAME.execute(p);
     171
     172                if      (result instanceof Cons
     173                    && ((Cons)result).length() == 1
     174                    && ((Cons)result).car() instanceof Pathname) {
     175                    initTruename = (Pathname)result.car();
    173176                } else {
    174                     Debug.trace(errorMessage);
    175                     return NIL;
     177                  String errorMessage
     178                      = "Loadable FASL not found for "
     179                      + "'" + pathname + "'"
     180                      + " in "
     181                      + "'" + mergedPathname + "'";
     182                  if (ifDoesNotExist) {
     183                      return error(new FileError(errorMessage, mergedPathname));
     184                  } else {
     185                      Debug.trace(errorMessage);
     186                      return NIL;
     187                  }
    176188                }
    177189            }
  • trunk/abcl/src/org/armedbear/lisp/Pathname.java

    r12549 r12550  
    13581358
    13591359    // ### match-wild-jar-pathname wild-jar-pathname
    1360     private static final Primitive LIST_JAR_DIRECTORY = new pf_match_wild_jar_pathname();
     1360    static final Primitive MATCH_WILD_JAR_PATHNAME = new pf_match_wild_jar_pathname();
    13611361    private static class pf_match_wild_jar_pathname extends Primitive {
    13621362        pf_match_wild_jar_pathname() {
Note: See TracChangeset for help on using the changeset viewer.