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 ""
768
768
-- first this has a much better chance of working.
769
769
-- Note that this doesn't follow symlinks or DOSNAM~1s.
770
770
--
771
+ -- Similar to 'normalise', this does not expand @".."@, because of symlinks.
772
+ --
771
773
-- > x == y ==> equalFilePath x y
772
774
-- > normalise x == normalise y ==> equalFilePath x y
773
775
-- > equalFilePath "foo" "foo/"
776
+ -- > not (equalFilePath "/a/../c" "/c")
774
777
-- > not (equalFilePath "foo" "/foo")
775
778
-- > Posix: not (equalFilePath "foo" "FOO")
776
779
-- > Windows: equalFilePath "foo" "FOO"
Original file line number Diff line number Diff line change @@ -768,9 +768,12 @@ joinPath = foldr combine ""
768
768
-- first this has a much better chance of working.
769
769
-- Note that this doesn't follow symlinks or DOSNAM~1s.
770
770
--
771
+ -- Similar to 'normalise', this does not expand @".."@, because of symlinks.
772
+ --
771
773
-- > x == y ==> equalFilePath x y
772
774
-- > normalise x == normalise y ==> equalFilePath x y
773
775
-- > equalFilePath "foo" "foo/"
776
+ -- > not (equalFilePath "/a/../c" "/c")
774
777
-- > not (equalFilePath "foo" "/foo")
775
778
-- > Posix: not (equalFilePath "foo" "FOO")
776
779
-- > Windows: equalFilePath "foo" "FOO"
Original file line number Diff line number Diff line change @@ -768,9 +768,12 @@ joinPath = foldr combine ""
768
768
-- first this has a much better chance of working.
769
769
-- Note that this doesn't follow symlinks or DOSNAM~1s.
770
770
--
771
+ -- Similar to 'normalise', this does not expand @".."@, because of symlinks.
772
+ --
771
773
-- > x == y ==> equalFilePath x y
772
774
-- > normalise x == normalise y ==> equalFilePath x y
773
775
-- > equalFilePath "foo" "foo/"
776
+ -- > not (equalFilePath "/a/../c" "/c")
774
777
-- > not (equalFilePath "foo" "/foo")
775
778
-- > Posix: not (equalFilePath "foo" "FOO")
776
779
-- > Windows: equalFilePath "foo" "FOO"
Original file line number Diff line number Diff line change @@ -359,6 +359,8 @@ tests =
359
359
,(" 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)
360
360
,(" P.equalFilePath \" foo\" \" foo/\" " , property $ P. equalFilePath " foo" " foo/" )
361
361
,(" 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" ))
362
364
,(" not (P.equalFilePath \" foo\" \" /foo\" )" , property $ not (P. equalFilePath " foo" " /foo" ))
363
365
,(" not (W.equalFilePath \" foo\" \" /foo\" )" , property $ not (W. equalFilePath " foo" " /foo" ))
364
366
,(" not (P.equalFilePath \" foo\" \" FOO\" )" , property $ not (P. equalFilePath " foo" " FOO" ))
You can’t perform that action at this time.
0 commit comments