[Ecls-list] A few pathname bugs

Richard M Kreuter kreuter at progn.net
Sun Dec 31 21:04:14 UTC 2006


Hi,

I'm trying to port some gunky file manipulation code to ECL (today's
anonymous CVS from common-lisp.net, as the CFFI page says that CFFI
requires ECL CVS), and have found the following weird things with
pathnames.  I think that they're probably bugs, though technically it's
an implementor's prerogative to define all pathname bugs as
implementation choices ;)

(1) common case translation doesn't seem to get applied to strings in
    directory components:

> (make-pathname :case :common :directory '(:relative "FOO")
                 :name "BAR" :type "BAZ")
#P"FOO/bar.baz"

(2) Pathnames with a directory starting with :relative :back don't
    seem to be constructable: (these are occasionally useful for
    merging):

> (make-pathname :directory '(:relative :back "foo"))
(make-pathname :directory '(:relative :back "foo"))
Filesystem error with pathname #<Unprintable pathname>.

(3) Pathnames with a directory containing a :back component anywhere
    else get constructed strangely

> (make-pathname :directory '(:relative "symlink" :back "foo"))
#P"symlink/symlink/foo/"

(I'd expected either a pathname with the directory containing the whole
list or else a pathname whose directory component was '(:relative
"foo").)

(4) enough-namestring doesn't seem to do anything:

> (enough-namestring #P"/abc/def" #P"/abc/")
"/abc/def"
> (enough-namestring #P"/abc/def/ghi" #P"/abc/def/")
"/abc/def/ghi"

Thanks,
RmK




More information about the ecl-devel mailing list