On Tue, 2004-06-22 at 21:02, Keith Wansbrough wrote: > > BTW, one other caveat (which applies to all of the examples so far): > > doesDirectoryExist doesn't distinguish between directories and > > symlinks to directories. Consequently, any directory-traversal > > algorithm which uses doesDirectoryExist to identify directories will > > behave incorrectly in the presence of symlinks. In the worst case, you > > can get into an infinite loop. > > symlinks aren't necessary to give an infinite loop: you can have > upwards hard links as well (at least on *nix). You have to keep a > list of inodes you've already visited (per filesystem, of course).
I believe hard linked directories are banned to avoid this problem. This is true on Linux at least, I don't know what POSIX specifies. Duncan _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell