in reply to Re: Cleaning up a path
in thread Cleaning up a path

While that works for

/foo/../bar -> /bar foo/../bar -> bar /foo/bar/../../moo -> /moo /var/log/../../home/poletti/../../etc/passwd -> /etc/passwd

it doesn't work for

/foo/.. -> <- Should be / foo/.. -> <- Should be . (?) .. -> <- Should be .. ../foo -> foo <- Should be ../foo ../foo/bar -> foo/bar <- Should be ../foo/bar foo/bar/../.. -> <- Should be . (?) /foo/bar/../.. -> <- Should be /