>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)srce.hr> writes:
Hrvoje> Adrian Aichner <aichner(a)ecf.teradyne.com> writes:
> (directory-files ...) whit a default FILES-ONLY argument of nil
> includes ".", and even ".." in the returned list.
>
> This occurs on system-types `usg-unix-v' (Solaris2.5.1) and
> `windows-nt' (Workstation 4.0, native build) with the twist that NT
> does not include ".", and ".." when invoked on "/".
>
> This gotta be broken, right?
Hrvoje> Your description does not make it clear what you consider a bug:
Hrvoje> including "." and ".." on Unix or not including them on
NT when
Hrvoje> invoked on "/"?
Hrvoje,
after reading the doc-string of `directory-files', which contains
this bit:
If FILES-ONLY is the symbol t, then only the "files" in the directory
will be returned; subdirectories will be excluded. If FILES-ONLY is not
nil and not t, then only the subdirectories will be returned. Otherwise,
if FILES-ONLY is nil (the default) then both files and subdirectories will
be returned.
I consider including ".", and ".." as ``subdirectories'' of
any directory
a bug. Else the doc string should make this property of
`directory-files' more clear.
Wouldn't you agree that the statement "Directory / contains itself,
its parent directory and some more files and directories" is asking for
trouble as it stands? It smells inf-loopy to me.
The different behavior on UNIX and NT I consider another bug.
Just my two ".." :-)
Adrian
Hrvoje> The former is not a bug -- that's how `directory-files' has always
Hrvoje> behaved. The latter might be a bug.
Hrvoje> --
Hrvoje> Hrvoje Niksic <hniksic(a)srce.hr> | Student at FER Zagreb, Croatia
Hrvoje> --------------------------------+--------------------------------
Hrvoje> Your lucky number today is 29842924728. Look for it everywhere.
--
Adrian Aichner
Applications Engineer
Teradyne GmbH
Semiconductor Test Group Telephone +49/89/41861(0)-208
Dingolfinger Straße 2 Fax +49/89/41861-217
D-81673 MÜNCHEN E-mail aichner(a)ecf.teradyne.com