This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 3/5] Introduce gdb_tilde_expand


On Friday, September 22 2017, Pedro Alves wrote:

> On 09/22/2017 07:07 PM, Sergio Durigan Junior wrote:
>> On Friday, September 22 2017, Pedro Alves wrote:
>> 
>>>>>> +/* See common/gdb_tilde_expand.h.  */
>>>>>> +
>>>>>> +std::string
>>>>>> +gdb_tilde_expand (const char *dir)
>>>>>> +{
>>>>>> +  gdb_glob glob (dir, GLOB_TILDE | GLOB_TILDE_CHECK | GLOB_ONLYDIR, NULL);
>>>>>
>>>>> By my reading of man glob, GLOB_TILDE_CHECK already implies GLOB_TILDE.
>>>>
>>>> Yes, but I think it pays to be explicit in this case.
>>>
>>> I think it only adds to confusion.  I did "man glob",
>>> saw that GLOB_TILDE_CHECK implies GLOB_TILDE and then
>>> got to wonder why is GLOB_TILDE being passed explicitly.
>> 
>> Well, I personally don't really see the reason for the confusion here
>> since you could have read GLOB_TILDE's entry as well and noticed that
>> there is nothing fancy being done here, but I respect your way of
>> thinking, so I will just remove GLOB_TILDE_CHECK.
>
> I did not suggest to remove GLOB_TILDE_CHECK.

Sorry, my bad, I meant "remove GLOB_TILDE".

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]