
Good point. In order to do proper normalization we need IO monad. The absolutizePath function is already in IO. I propose to remove normalizePath function and to keep only absolutizePath function (in System.Directory). On Windows it can be implemented on top of GetFullPathName and on Unix there is realpath function. Cheers, Krasimir --- diatchki@cse.ogi.edu wrote:
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
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
__________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail