Commit 645d2972 authored by thomie's avatar thomie
Browse files

Bug fix: normalise "//server/test" == "\\\\server\\test"

When drive represents a network share, slashes were not being normalised
properly.
parent 9cacf87d
......@@ -749,6 +749,7 @@ makeRelative root path
-- > Windows: normalise "c:\\file/bob\\" == "C:\\file\\bob\\"
-- > Windows: normalise "c:\\" == "C:\\"
-- > Windows: normalise "\\\\server\\test" == "\\\\server\\test"
-- > Windows: normalise "//server/test" == "\\\\server\\test"
-- > Windows: normalise "c:/file" == "C:\\file"
-- > Windows: normalise "\\" == "\\"
-- > normalise "." == "."
......@@ -783,7 +784,7 @@ normaliseDrive :: FilePath -> FilePath
normaliseDrive drive | isPosix = drive
normaliseDrive drive = if isJust $ readDriveLetter x2
then map toUpper x2
else drive
else x2
where
x2 = map repSlash drive
......
......@@ -10,6 +10,9 @@
* Bug fix: on Windows, `normalise "\\"` now retuns `"\\"` unchanged,
instead of `"\\\\"`.
* Bug fix: on Windows, `normalise "//server/test"` now retuns
`"\\\\server\\test"`, instead of `"//server/test"` unchanged.
## 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