cmucl issueshttps://gitlab.common-lisp.net/cmucl/cmucl/-/issues2020-08-02T20:54:24Zhttps://gitlab.common-lisp.net/cmucl/cmucl/-/issues/33directory: Behaviour for non-wild paths as intended?2020-08-02T20:54:24ZElias Pippingdirectory: Behaviour for non-wild paths as intended?The [CLHS entry on `directory`](http://clhs.lisp.se/Body/f_dir.htm) has this (non-binding) note:
> If the pathspec is not wild, the resulting list will contain either zero or one elements.
(It doesn't say when the list should be empty ...The [CLHS entry on `directory`](http://clhs.lisp.se/Body/f_dir.htm) has this (non-binding) note:
> If the pathspec is not wild, the resulting list will contain either zero or one elements.
(It doesn't say when the list should be empty and when it should be a singleton). This output:
```common-lisp
(directory "/home/pipping/sbcl-test/")
=> (#P"/home/pipping/sbcl-test/.dir/" #P"/home/pipping/sbcl-test/dir/"
#P"/home/pipping/sbcl-test/file" #P"/home/pipping/sbcl-test/dir/"
#P"/home/pipping/sbcl-test/dir/dir-in-dir/" #P"/home/pipping/sbcl-test/file")
```
clearly goes against the note, though. CMU CL is not the only lisp to ignore it ([others are Allegro CL and LispWorks](http://paste.lisp.org/display/327362)). But there are plenty of lisps that appear to respect it. Since it's just a note, "we decided to ignore it on purpose" is an acceptable answer; I wanted to raise this issue and make sure that's indeed intended, though.
NB: This is not an issue of pathnames vs. strings:
```common-lisp
(wild-pathname-p (pathname "/home/pipping/sbcl-test/"))
=> NIL
(directory (pathname "/home/pipping/sbcl-test/"))
=> (#P"/home/pipping/sbcl-test/.dir/" #P"/home/pipping/sbcl-test/dir/"
#P"/home/pipping/sbcl-test/file" #P"/home/pipping/sbcl-test/dir/"
#P"/home/pipping/sbcl-test/dir/dir-in-dir/" #P"/home/pipping/sbcl-test/file")
```21b