[Ecls-list] Case of path is still wrong.

Pascal J. Bourguignon pjb at informatimago.com
Sun Jun 27 04:56:13 UTC 2010


[pjb at kuiper :0.0 tools]$ ecl -norc
ECL (Embeddable Common-Lisp) 10.4.2
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.  
Top level in: #<process SI:TOP-LEVEL 0000000000642f60>.
>  (make-pathname :name "DIRECTORIES" :type "TXT"
                                           :version nil :case :common
                                           :defaults (user-homedir-pathname))

#P"/HOME/PJB/directories.txt"
> (user-homedir-pathname)

#P"/home/pjb/"
> 


AFAIUI, the :CASE argument of MAKE-PATHNAME should not apply to
:DEFAULTS, but only to the other arguments given to MAKE-PATHNAME.


(make-pathname :directory (list :absolute x) :case :common
               :defaults (make-pathname :name x :case :common 
                                        :defaults (make-pathname :type x :case :common)))

should be equivalent to 

(make-pathname :directory (list :absolute x) :name x :type x :case :common)



But this is not the case:

(let ((x "ABC"))
    (values 
      (make-pathname :directory (list :absolute x) :name x :type x :case :common)
      (make-pathname :directory (list :absolute x) :case :common
                     :defaults (make-pathname :name x :case :common 
                                              :defaults (make-pathname :type x :case :common)))))
--> #P"/abc/abc.abc"
    #P"/abc/ABC.abc"


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/





More information about the ecl-devel mailing list