merge-pathnames bug with :back component

Vibhu Mohindra vibhu.mohindra at gmail.com
Tue Jun 14 03:00:06 UTC 2016


CLHS for merge-pathnames specifies that,
  "This removal of redundant :back keywords is repeated as many times as
   possible."

abcl-1.3.2
The first expression below evaluates correctly, but the second produces
an error.

FCFS(34): (merge-pathnames
            (make-pathname :directory '(:relative "a" "b" :back))
            (make-pathname :directory '(:absolute "root")))

#P"/root/a/"
FCFS(35): (merge-pathnames
            (make-pathname :directory '(:relative "a" "b" :back :back))
            (make-pathname :directory '(:absolute "root")))

#<THREAD "interpreter" {43B4AF3C}>: Debugger invoked on condition of
type FILE-ERROR
  Unsupported directory component BACK.
Restarts:
  0: TOP-LEVEL Return to top level.

For what it's worth, CCL also produces an error. CLISP, ECL, SBCL
correctly produce:
#P"/root/"

(That said, I'm far from a pathname expert and could be completely wrong.)

Vibhu



More information about the armedbear-devel mailing list