From: Linus Torvalds Date: Thu, 09 Jul 2009 23:52:47 GMT Subject: Re: [PATCH 4/3] Avoid using 'lstat()' to figure out directories Message-ID: In-Reply-To: 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