bug in System.FilePath.isRelative ?

Neil Mitchell ndmitchell at gmail.com
Sun Nov 4 07:45:33 EST 2007


> *FilePath> isRelative "c:file"
> False
> this path should be considered as relative, afaik

Certainly some things treat this as relative. But really, its not that
relative by other metrics. A relative path in general should be able
to be reconstituted by doing currentDirectory </> x. This does not
have that property. The other property you might expect a relative
path to have is that changing the current directory changes the path -
which is half true, since on Windows there is a current directory per
drive, so this relative path may refer to that, or not.

Basically, having c:file is REALLY broken from every sensible point of
view. If you can give me a "in this real program it needs to be this
way because..." then I'll change it. If its more a theoretical
concern, then it depends how loud you shout or what the common
concensus is.

In summary: filepaths are a nightmare.



More information about the Libraries mailing list