Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: misc glob fixes



Zoltan Hidvegi wrote:
>First, many systems ignore trailing slashes on filenames.  As a result */
>will match all files instead of just directories as required by common
>sense and the POSIX standard.  The solution is to stat/lstat/access
>`filename/.' instead of `filename/'.

But "filename/." can't be statted if the directory is not searchable
by the zsh process, whereas POSIX would require the glob to succeed.
It would be better to stat "filename/" and test that the result has
type directory.

-zefram



Messages sorted by: Reverse Date, Date, Thread, Author