Re: [PATCH 4/3] Avoid using 'lstat()' to figure out directories

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

 




On Thu, 9 Jul 2009, Linus Torvalds wrote:
>
> Of course, since 'path' is a 'const char *', we'd need to either do a 
> silly copy, or we'd need to change a whole lot of the code to make it 
> clear that we can actually add a slash to the end (which we can: I think 
> it's already always going to be an array that we _will_ add a slash to in 
> case it turns out to be a directory).

No, I was wrong. We really do give it an array that we can't change 
through the 'excluded()' function.

So we'd need to do the whole "copy name and add '/' at the end" thing. But 
the upside would then be that after that, we'd not need any looping to 
find the right ce. So it might be the right thing to do despite the 
extra copy.

			Linus
--
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]