[cmucl-imp] ENOUGH-NAMESTRING and .~N~

Raymond Toy toy.raymond at gmail.com
Sun Dec 2 18:15:27 UTC 2012


>>>>> "Helmut" == Helmut Eller <heller at common-lisp.net> writes:

    Helmut> Create a file .my-file.~1~ like so:
    bash> mkdir -p /tmp/my-dir; touch /tmp/my-dir/.my-file.~1~

    Helmut> then in CMUCL:

    Helmut> * (defparameter *my-dir* (truename "/tmp/my-dir/"))
    Helmut> * (enough-namestring (car (directory *my-dir*)) *my-dir*)
    Helmut> Error in function (FLET LISP::LOSE
    Helmut> LISP::UNPARSE-UNIX-ENOUGH):
    Helmut> #P"/tmp/my-dir/.my-file.~1~" cannot be represented
    Helmut> #relative to #P"/tmp/my-dir/"
    Helmut> [Condition of type SIMPLE-ERROR]

    Helmut> That's odd, no?

Yes.  It seems that for some reason if the pathname has a version,
then a pathname type is required.  Since your default pathname has
none, it errors.

I have no idea why that is required.  Removing that requirement allows
your example to work.  I don't know what other effects such a change
would have, though.

Pathnames are hairy.

Ray



More information about the cmucl-imp mailing list