Hello,
Appologies if someone already noticed this,
but the 'normalize' function does not seem quite correct
(at least on Unix like machines).
The problem is that ".." behaves weird when links are used.
When you get somewhere via a link, and then use ".."
you end up above the directory that the link pointed to.
This is probably best illustrated with an example:
-- Suppose that I am in my home directory:
>pwd
/home/diatchki
-- Now I create a link that points to /usr/local
>ln -s /usr/local test
-- This makes a link in my current directory that points to /usr/local
-- Now I type the following command:
>cd test/..
Now if test was not a link, this does nothing and I should still
be in my home directory. However since 'test' is a link, I actually end
up in /usr.
I happen to think that this is not very nice, but I think most utilities
probably conform to this rule, so perhaps so should we.
-Iavor