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.
This commit is contained in:
Saeid Al-Wazzan 2013-09-16 01:17:38 +03:00
parent 11d5b8064a
commit a796988a16

View File

@ -25,7 +25,7 @@ import Data.Char (digitToInt, intToDigit,
isDigit, toLower)
import Data.List (isPrefixOf)
import qualified Data.Set as S
import System.FilePath (joinPath, splitPath,
import System.FilePath.Posix (joinPath, splitPath,
takeDirectory)
import Text.Blaze.Html (toHtml)
import Text.Blaze.Html.Renderer.String (renderHtml)