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 /
In reply to Re^2: Cleaning up a path
by ikegami
in thread Cleaning up a path
by polettix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |