[Top][All Lists]

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

[Nmh-workers] Question on compath() in sbr/path.c

From: Jon Steinhart
Subject: [Nmh-workers] Question on compath() in sbr/path.c
Date: Fri, 28 Jan 2005 11:46:25 -0800

Howdy.  I've been trying to figure out exactly what nmh does with folder names
so that I can have an external-to-nmh program treat them the same way.  I
noticed something curious in compath() in sbr/path.c

I'm guessing that the purpose of this function is to "compact a path" by
removing extraneous elements.

One of the tests (second one under case '.') looks for a trailing /.. on a
path.  It would convert a path of /foo/bar/.. to /foo.

This doesn't seem correct to me.  It works unless bar is a symbolic link.  A
/.. after a symbolic link climbs up the tree on the link target side of things,
not the link name.

So two questions:  Should I fix it and what's the correct fix?  If it should
be fixed, the only thing that I can see doing is to remove this section of code
because there's no requirement that the path passed to compath() exists, making
it impossible to test the path elements.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]