uiop/filesystem:directory-files SBCL lists directories as well as files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| ASDF |
Undecided
|
Robert P. Goldman |
Bug Description
In SBCL directories are included into the output (Debian). In Linux everything is a file; however, CLISP does not return directories.
Faré (fahree) wrote : | #1 |
Faré (fahree) wrote : | #2 |
And of course, if the fix consists in tweaking the underlying call to DIRECTORY, we should at least verify that that doesn't break old versions of SBCL.
Robert P. Goldman (rpgoldman) wrote : | #3 |
I'm reading the docstring for this function, and I'm not sure what is the right behavior here. The docstring does not state whether subdirectories are to be filtered out. Is that the intended behavior? I.e., is SBCL wrong here, or clisp?
Faré (fahree) wrote : | #4 |
Yes, directory-files was supposed to return the files, not directories.
Symlinks make that hard.
Ideally, there would be directory-files, subdirectories, and directory-symlinks.
But oh well, all that is not very portable. :-(
Robert P. Goldman (rpgoldman) wrote : | #5 |
Thanks. Related to that, the docstring states: "according to the PATTERN, which is not very portable to override."
I'm not sure exactly what to say about the PATTERN, so am inclined to drop that. Is that OK?
I'll try to construct a test for this.
Faré (fahree) wrote : | #6 |
The user can provide a optional argument PATTERN for the directory command, that overrides whatever uiop uses. But what uiop uses is implementation-
Robert P. Goldman (rpgoldman) wrote : | #7 |
DIRECTORY-FILES lists directories on ACL 9.0 Mac OS X, as well as on SBCL.
Robert P. Goldman (rpgoldman) wrote : | #8 |
Fixed in 3.1.0.64
Changed in asdf: | |
assignee: | nobody → Robert P. Goldman (rpgoldman) |
status: | New → Fix Committed |
Changed in asdf: | |
milestone: | none → asdf3-1 |
Changed in asdf: | |
status: | Fix Committed → Fix Released |
If playing with the pathname being directory'ed doesn't fix this bug, uiop could work around this by filtering results. Oh well. Yuck.
Robert, thanks for adopting this ugly baby.