uiop/filesystem:directory-files SBCL lists directories as well as files

Bug #1276748 reported by Stanislav
6
This bug affects 1 person
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.

Revision history for this message
Faré (fahree) wrote :

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.

Revision history for this message
Faré (fahree) wrote :

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.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

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?

Revision history for this message
Faré (fahree) wrote :

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. :-(

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

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.

Revision history for this message
Faré (fahree) wrote :

The user can provide a optional argument PATTERN for the directory command, that overrides whatever uiop uses. But what uiop uses is implementation-dependent, and overriding it will not work portably, unless you make sure your pattern works everywhere, at which point you'll be better off using iolib.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

DIRECTORY-FILES lists directories on ACL 9.0 Mac OS X, as well as on SBCL.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers