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

Paul Eggert eggert@cs.ucla.edu
Mon Dec 4 19:32:00 GMT 2017


On 12/04/2017 07:46 AM, Dmitry Goncharov wrote:
>> Can't you simply copy nonnull entries in-place, in a single pass?
> The first pass calls is_dir and frees and resets files. Do you mean to
> also do copying in this very pass?

I would think that would be easy, yes.

>
>> That way, the filtered order will be the same as the original order.
> The stable algorithm results in more iterations and more copying. Are you sure?

Sorry, I'm not seeing why an extra iteration would be needed. I expect 
users would prefer that this bug-fix does not alter the order of 
returned values.



More information about the Libc-alpha mailing list