jaspervdj/hakyll — pull request #179 by saeidw (2013-09-15 22:39:17+00:00)
Title: Fix incorrect output of toSiteRoot on Windows.

toSiteRoot uses splitPath, joinPath, and takeDirectory from the
System.FilePath module. On Windows systems, the implementation of
joinPath will build up a path using the Windows path separator "\\".

We don't want this behavior since the paths we are working with
are always URLs, so we force POSIX behavior for System.FilePath.

Running `cabal test` on Windows, the following test was failing:

-- tests/Hakyll/Web/Html/Tests.hs:
"../.." @=? toSiteRoot "foo/bar/qux"
...
[ 4] toSiteRoot: [Failed]
expected: "../.."
but got: "..\\.."

This fix will cause that test to pass on Windows by using POSIX behavior within Hakyll.Web.Html.