Changeset 12552


Ignore:
Timestamp:
03/16/10 21:02:54 (11 years ago)
Author:
Mark Evenson
Message:

Refine TRANSLATE-PATHNAME to match SBCL's behavior on corner case.

This patch allows

(TRANSLATE-PATHNAME

#P"/Users/evenson/work/bordeaux-threads/src/bordeaux-threads.abcl"
#P"///*.*"
#P"/Users/evenson/.cache/common-lisp/armedbear-0.20.0-dev-darwin-unknown//*.*")

to return

#P"/Users/evenson/.cache/common-lisp/armedbear-0.20.0-dev-darwin-unknown/bordeaux-threads.abcl"

which matches SBCL' behavior, and seems reasonable that if there is no
more of SRC or TO left to match and FROM has a :WILD-INFERIORS, one
might as well return what has matched so far.

File:
1 edited

Legend:

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

    r12417 r12552  
    233233                   (translate-directory-components-aux
    234234                    src (cdr from) (cdr to) case))))
     235       (when (and (null src)
     236                  (eq (car from) :wild-inferiors)
     237                  (eq (car to) :wild-inferiors))
     238         (return-from translate-directory-components-aux nil))
    235239       (when (null src) ;; SRC is NIL and we're still here: error exit
    236240         (throw 'failed-match))))))
Note: See TracChangeset for help on using the changeset viewer.