Re: [GHC] #1278: filepath’s makeRelative does not work for relative directories

Neil Mitchell ndmitchell at gmail.com
Mon Apr 16 11:07:07 EDT 2007


Hi

> >  hmm, looking at it, makeRelative has no generalised QuickCheck properties,
> >  and all the specific instances are on absolute paths. I'll try and come up
> >  with a patch for this that does the right thing in this situation.
>
> I'd expect something like this:
>  org </> makeRelative org x == x
> or at least something like
>  normalise (org </> makeRelative org x) == normalise x
> at least on a best effort basis.

Alas thats not true, because makeRelative can insert ".." paths which
can't be removed by normalise as they might be symlinks elsewhere. I
wonder if makeRelative should insert .. paths - any thoughts?

If not, then we could do:

>  org </> makeRelative org x == x
>  makeRelative x (x </> y) = y

Thoughts?

Thanks

Neil
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



More information about the Glasgow-haskell-bugs mailing list