Commit 9cacf87d authored by thomie's avatar thomie
Browse files

Bug fix: normalize "\\" == "\\"

parent fd201b7f
......@@ -750,6 +750,7 @@ makeRelative root path
-- > Windows: normalise "c:\\" == "C:\\"
-- > Windows: normalise "\\\\server\\test" == "\\\\server\\test"
-- > Windows: normalise "c:/file" == "C:\\file"
-- > Windows: normalise "\\" == "\\"
-- > normalise "." == "."
-- > Posix: normalise "./" == "./"
-- > Posix: normalise "./." == "./"
......@@ -757,7 +758,7 @@ makeRelative root path
-- > Posix: normalise "bob/fred/." == "bob/fred/"
normalise :: FilePath -> FilePath
normalise path = joinDrive' (normaliseDrive drv) (f pth)
++ [pathSeparator | isDirPath pth]
++ [pathSeparator | isDirPath pth && length pth > 1]
where
(drv,pth) = splitDrive path
......
......@@ -7,6 +7,9 @@
* Bug fix: on Windows, `dropTrailingPathSeparator "/"` now returns `"/"`
unchanged, instead of the normalised `"\\"`.
* Bug fix: on Windows, `normalise "\\"` now retuns `"\\"` unchanged,
instead of `"\\\\"`.
## 1.3.0.2 *Mar 2014*
* Bundled with GHC 7.8.1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment