[PATCH] posix: if glob has a trailing slash match directories only.

Dmitry Goncharov dgoncharov@users.sf.net
Wed Nov 29 22:05:00 GMT 2017


On Tue, Nov 28, 2017 at 5:04 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> (+cc: bug-gnulib@, since they share this code)


> If I understand correctly, this treats DT_UNKNOWN like DT_DIR when stat
> indicates that it is a directory.

The patch checks if an entry is really a dir if type is DT_UNKNOWN.

>
> What should happen in the DT_LNK case?  Should the same logic trip for
> it as well so we can distinguish between a symlink to a directory and
> other symlinks?

You are right. i'll add a test and post another patch.


regards, Dmitry



More information about the Libc-alpha mailing list