This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] posix: if glob has a trailing slash match directories only.
- From: Dmitry Goncharov <dgoncharov at users dot sf dot net>
- To: Jonathan Nieder <jrnieder at gmail dot com>
- Cc: libc-alpha at sourceware dot org, bug-gnulib at gnu dot org
- Date: Wed, 29 Nov 2017 17:05:34 -0500
- Subject: Re: [PATCH] posix: if glob has a trailing slash match directories only.
- Authentication-results: sourceware.org; auth=none
- References: <20171128210857.GC2745@madrid> <20171128220453.GC27469@aiede.mtv.corp.google.com>
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