in reply to Collapsing paths

Just to be very specific, since the other answers in this thread only skirt around the issue (and some ignore it entirely and therefore do the wrong thing)...

You do realize that "foo/../bar/bletch" cannot be reduced unless you're absolutely sure that "foo" is not a symlink, correct? Because if it is a symlink, then the ".." is relative to where "foo" points, not to where "foo" itself is located.

Replies are listed 'Best First'.
Re^2: Collapsing paths
by rvosa (Curate) on Dec 05, 2007 at 19:03 UTC
    Great point, thanks. There are no symlinks in the structure I'm moving around so it's not an issue in this case, though.