Re: [PATCH v2 2/4] compat/basename: make basename() conform to POSIX

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

 



Johannes Schindelin <schindelin@xxxxxxxx> writes:

> Hi Junio,
>
> On Fri, 8 Jan 2016, Junio C Hamano wrote:
>
>> Johannes Schindelin <johannes.schindelin@xxxxxx> writes:
>> 
>> > According to POSIX, basename("/path/") should return "path", not
>> > "path/". Likewise, basename(NULL) and basename("abc") should both
>> > return ".".
>> 
>> Did you mean basename("abc"), not basename(""), here?  
>
> I don't understand: I wrote basename("abc")... ;-)

Yeah, I read that.  What I didn't read was you wrote 'path' between
slashes in the first example (the MUA was trying to render it as
"path" in italic or something silly like that), and made me
confused: If 'path' has to go to 'path', what's so special about
'abc' to make it go '.'?

Upon second reading I noticed that slashes around the first one, but
forgot to remove the "why 'abc'" comment.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]