<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH] Header cache and slashes



On Fri, Mar 17, 2006 at 11:36:00PM +0100, Phil Pennock wrote:
> On 2006-03-17 at 13:34 -0500, Derek Martin wrote:
> > I haven't looked over the patch, but the behavior you are describing
> > is the correct one, i.e. it is consistent with how the filesystem
> > behaves.
> > 
> > If you don't believe me, execute the following command on your
> > (unix-like) system:
> > 
> >   cd ///////
> 
> So Unix normalises paths by treating a sequence of consecutive
> separators as equivalent to one.  It normalises, and that's what I
> thought the poster was getting mutt to do.

It seems we are in agreement. =8^)  FWIW, in case it wasn't clear, I
was voicing support for the patch, and providing a logical argument
for why it makes sense.

> In Unix, the difference between "cd /etc/" and "cd /etc" is that the
> shell or the chdir() libc library function probably strips off the
> trailing "/" before passing it to a system call, or perhaps the kernel
> even ignores it.  "/etc/" is not different from "/etc".  So making mutt
> behave the same, normalising paths, is reasonable.

I'm not 100% sure (as in, I haven't looked at the source), but I
believe it's the kernel that handles this.  IIRC it works the same way 
if you pass such arguments to system calls.  I'd write a little
program to test it, but I'm almost certain there's something more
important I should be doing right now...  ;-)

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail.  Sorry for the inconvenience.  Thank the spammers.

Attachment: pgpCb7CrZx3dg.pgp
Description: PGP signature