[RFC][BZ #10278] glob() gives inconsistent results with trailing "/"
Carlos O'Donell
carlos@redhat.com
Thu Oct 17 01:04:00 GMT 2013
On 10/11/2013 11:24 AM, OndÅej BÃlka wrote:
> On Thu, Oct 03, 2013 at 04:49:40AM -0400, Carlos O'Donell wrote:
>> On 10/03/2013 03:59 AM, OndÅej BÃlka wrote:
>>> Hi,
>>>
>>> For this bug https://sourceware.org/bugzilla/show_bug.cgi?id=10278 there
>>> is a simple fix when we have DIRENT_H defined.
>>>
>>> For cross platform solution we would need surround this by ifdefs when
>>> separator is not slash and handling case of no dirent.
>>>
>>> Comments?
>>
>> Sounds correct.
>>
>> We should add a regression test for this.
>>
>
> When I tried add a test I encountered an unexpected result, any insight
> into this?
>
> results for glob ("*/*/", GLOB_ALTDIRFUNC)
> dir1lev1/dir1lev2/
> dir1lev1/dir2lev2/
> dir1lev1/dir3lev2/
> dir2lev1/dir1lev2/
> file2lev1/dir2lev1 *** WRONG
No idea, I'd have to dig into this to figure out why.
You definitely need to figure out why before we can
checkin the patch.
Cheers,
Carlos.
More information about the Libc-alpha
mailing list