bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Paul Eggert
Subject: Re: [PATCH] posix: if glob has a trailing slash match directories only.
Date: Mon, 4 Dec 2017 11:32:06 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]