Revert "Improved previous patch so it really solves the Windows issue."

This reverts commit e80116c813.
This commit is contained in:
John MacFarlane 2013-04-20 10:09:17 -07:00
parent e80116c813
commit 3c1a8d1924

View file

@ -105,6 +105,7 @@ import Network.HTTP (findHeader, rspBody,
import Network.Browser (browse, setAllowRedirects, request)
#ifdef EMBED_DATA_FILES
import Text.Pandoc.Data (dataFiles)
import System.FilePath ( joinPath )
#else
import Paths_pandoc (getDataFileName)
#endif
@ -525,7 +526,7 @@ readDefaultDataFile fname =
Nothing -> ioError $ userError
$ "Data file `" ++ fname ++ "' does not exist"
Just contents -> return contents
where makeCanonical = intercalate "/" . transformPathParts . splitBy (=='/')
where makeCanonical = joinPath . transformPathParts . splitBy (=='/')
transformPathParts = reverse . foldl go []
go as "." = as
go (_:as) ".." = as