File tree Expand file tree Collapse file tree 4 files changed +11
-0
lines changed Expand file tree Collapse file tree 4 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -768,9 +768,12 @@ joinPath = foldr combine ""
768768-- first this has a much better chance of working.
769769-- Note that this doesn't follow symlinks or DOSNAM~1s.
770770--
771+ -- Similar to 'normalise', this does not expand @".."@, because of symlinks.
772+ --
771773-- > x == y ==> equalFilePath x y
772774-- > normalise x == normalise y ==> equalFilePath x y
773775-- > equalFilePath "foo" "foo/"
776+ -- > not (equalFilePath "/a/../c" "/c")
774777-- > not (equalFilePath "foo" "/foo")
775778-- > Posix: not (equalFilePath "foo" "FOO")
776779-- > Windows: equalFilePath "foo" "FOO"
Original file line number Diff line number Diff line change @@ -768,9 +768,12 @@ joinPath = foldr combine ""
768768-- first this has a much better chance of working.
769769-- Note that this doesn't follow symlinks or DOSNAM~1s.
770770--
771+ -- Similar to 'normalise', this does not expand @".."@, because of symlinks.
772+ --
771773-- > x == y ==> equalFilePath x y
772774-- > normalise x == normalise y ==> equalFilePath x y
773775-- > equalFilePath "foo" "foo/"
776+ -- > not (equalFilePath "/a/../c" "/c")
774777-- > not (equalFilePath "foo" "/foo")
775778-- > Posix: not (equalFilePath "foo" "FOO")
776779-- > Windows: equalFilePath "foo" "FOO"
Original file line number Diff line number Diff line change @@ -768,9 +768,12 @@ joinPath = foldr combine ""
768768-- first this has a much better chance of working.
769769-- Note that this doesn't follow symlinks or DOSNAM~1s.
770770--
771+ -- Similar to 'normalise', this does not expand @".."@, because of symlinks.
772+ --
771773-- > x == y ==> equalFilePath x y
772774-- > normalise x == normalise y ==> equalFilePath x y
773775-- > equalFilePath "foo" "foo/"
776+ -- > not (equalFilePath "/a/../c" "/c")
774777-- > not (equalFilePath "foo" "/foo")
775778-- > Posix: not (equalFilePath "foo" "FOO")
776779-- > Windows: equalFilePath "foo" "FOO"
Original file line number Diff line number Diff line change @@ -359,6 +359,8 @@ tests =
359359 ,(" W.normalise x == W.normalise y ==> W.equalFilePath x y" , property $ \ (QFilePath x) (QFilePath y) -> W. normalise x == W. normalise y ==> W. equalFilePath x y)
360360 ,(" P.equalFilePath \" foo\" \" foo/\" " , property $ P. equalFilePath " foo" " foo/" )
361361 ,(" W.equalFilePath \" foo\" \" foo/\" " , property $ W. equalFilePath " foo" " foo/" )
362+ ,(" not (P.equalFilePath \" /a/../c\" \" /c\" )" , property $ not (P. equalFilePath " /a/../c" " /c" ))
363+ ,(" not (W.equalFilePath \" /a/../c\" \" /c\" )" , property $ not (W. equalFilePath " /a/../c" " /c" ))
362364 ,(" not (P.equalFilePath \" foo\" \" /foo\" )" , property $ not (P. equalFilePath " foo" " /foo" ))
363365 ,(" not (W.equalFilePath \" foo\" \" /foo\" )" , property $ not (W. equalFilePath " foo" " /foo" ))
364366 ,(" not (P.equalFilePath \" foo\" \" FOO\" )" , property $ not (P. equalFilePath " foo" " FOO" ))
You can’t perform that action at this time.
0 commit comments