git.iko.soy/typeable/pandoc
on master help sign in
Shared: Fixed readDefaultDataFile so it works on Windows.
commit89d525e41775086146234cb35669626ab222eccc authorJohn MacFarlane <fiddlosopher@gmail.com> dateSat 20 Apr 2013, 13:07 (14 years ago) parent3c1a8d1
1 file changed+2−2
src/Text/Pandoc/Shared.hs+2−2
src/Text/Pandoc/Shared.hs+2−2
@@ -105,7 +105,7 @@ import Network.HTTP (findHeader, rspBody,
105105import Network.Browser (browse, setAllowRedirects, request)
106106#ifdef EMBED_DATA_FILES
107107import Text.Pandoc.Data (dataFiles)
108−import System.FilePath ( joinPath )
108+import System.FilePath ( joinPath, splitDirectories )
109109#else
110110import Paths_pandoc (getDataFileName)
111111#endif
@@ -526,7 +526,7 @@ readDefaultDataFile fname =
526526 Nothing -> ioError $ userError
527527 $ "Data file `" ++ fname ++ "' does not exist"
528528 Just contents -> return contents
529− where makeCanonical = joinPath . transformPathParts . splitBy (=='/')
529+ where makeCanonical = joinPath . transformPathParts . splitDirectories
530530 transformPathParts = reverse . foldl go []
531531 go as "." = as
532532 go (_:as) ".." = as