Thread (12 messages) flat view 12 messages, 4 authors, 2016-06-15

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

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:47:02

Possibly related (same subject, not in this thread)


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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help