Changeset 12553


Ignore:
Timestamp:
03/17/10 13:22:36 (11 years ago)
Author:
Mark Evenson
Message:

Backport r12550: Fix loading of packed FASLs which have been renamed.

Location:
branches/0.19.x/abcl/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/0.19.x/abcl/src/org/armedbear/lisp/Load.java

    r12513 r12553  
    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            }
  • branches/0.19.x/abcl/src/org/armedbear/lisp/Pathname.java

    r12545 r12553  
    13491349
    13501350    // ### match-wild-jar-pathname wild-jar-pathname
    1351     private static final Primitive LIST_JAR_DIRECTORY = new pf_match_wild_jar_pathname();
     1351    static final Primitive MATCH_WILD_JAR_PATHNAME = new pf_match_wild_jar_pathname();
    13521352    private static class pf_match_wild_jar_pathname extends Primitive {
    13531353        pf_match_wild_jar_pathname() {
Note: See TracChangeset for help on using the changeset viewer.