aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-04-20 13:07:50 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-04-20 13:07:50 -0700
commit89d525e41775086146234cb35669626ab222eccc (patch)
tree1c4abbbff5debd568339a02bfb3252a4c9155431 /src
parent3c1a8d1924b89992ff06419fc2cad54f6d0f12b9 (diff)
downloadpandoc-89d525e41775086146234cb35669626ab222eccc.tar.gz
Shared: Fixed readDefaultDataFile so it works on Windows.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Shared.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 001af6c6d..f8c776e27 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -105,7 +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 )
+import System.FilePath ( joinPath, splitDirectories )
#else
import Paths_pandoc (getDataFileName)
#endif
@@ -526,7 +526,7 @@ readDefaultDataFile fname =
Nothing -> ioError $ userError
$ "Data file `" ++ fname ++ "' does not exist"
Just contents -> return contents
- where makeCanonical = joinPath . transformPathParts . splitBy (=='/')
+ where makeCanonical = joinPath . transformPathParts . splitDirectories
transformPathParts = reverse . foldl go []
go as "." = as
go (_:as) ".." = as