aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/PDF.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-03-09 21:26:25 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-03-09 21:26:25 -0700
commitc026c16fa6d9313dc2aa30e8348176e292dc78e0 (patch)
tree0bfa4daa84d1e16067a8407d75ad16c07109eb77 /src/Text/Pandoc/PDF.hs
parentf3c9d3788530e450d1bb23a4fd829bc5a6eed266 (diff)
downloadpandoc-c026c16fa6d9313dc2aa30e8348176e292dc78e0.tar.gz
PDF: Use / as path separators even on Windows.
This seems to be necessary for texlive. Closes #1151 (again!).
Diffstat (limited to 'src/Text/Pandoc/PDF.hs')
-rw-r--r--src/Text/Pandoc/PDF.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs
index 39442854d..06e4d2aae 100644
--- a/src/Text/Pandoc/PDF.hs
+++ b/src/Text/Pandoc/PDF.hs
@@ -91,7 +91,8 @@ handleImage' baseURL tmpdir (Image ils (src,tit)) = do
let ext = fromMaybe (takeExtension src) $
extensionFromMimeType mime
let basename = UTF8.toString $ B64.encode $ UTF8.fromString src
- let fname = tmpdir </> basename <.> ext
+ -- note: we want / even on Windows, for TexLive:
+ let fname = tmpdir ++ "/" ++ basename <.> ext
BS.writeFile fname contents
return $ Image ils (fname,tit)
_ -> do
@@ -143,7 +144,7 @@ extractMsg log' = do
runTeXProgram :: String -> Int -> FilePath -> String
-> IO (ExitCode, ByteString, Maybe ByteString)
runTeXProgram program runsLeft tmpDir source = do
- let file = tmpDir </> "input.tex"
+ let file = tmpDir ++ "/input.tex"
exists <- doesFileExist file
unless exists $ UTF8.writeFile file source
let programArgs = ["-halt-on-error", "-interaction", "nonstopmode",