Question about UIOP:ENSURE-DIRECTORY-PATHNAME

Robert Goldman rpgoldman at sift.net
Wed Jul 5 22:04:44 UTC 2023


While addressing ASDF [issue 
#140](https://gitlab.common-lisp.net/asdf/asdf/-/issues/140) I stumbled 
on what seems to me to be an error.  That is that

     (ensure-directory-pathname "")

at least on SBCL, returns a `pathname` that has `NIL` in all its slots 
except `HOST`.

To me, this seemed wrong, and looking further, I found that 
`directory-pathname-p` returns `T` when given this pathname, because 
`directory-pathname-p` is defined (in its docstring) as:

> A directory-pathname is a pathname _without_ a filename.

I would have assumed that a directory pathname was *also* a pathname 
with a non-`NIL` `directory` component.

I am considering making this (incompatible) change, but am interested in 
any feedback about whether this is the correct thing to do.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20230705/010249c4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 265 bytes
Desc: OpenPGP digital signature
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20230705/010249c4/attachment.sig>


More information about the asdf-devel mailing list