mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
Text.Pandoc.PDF: replace </> with literal "/".
We use forward-slash for a directory separator in tmpDir, even on Windows (because that's what tex likes). So we should not put a backslash between the tmpDir and the filename on Windows. This is harmless enough in normal Windows setups, but it breaks on Cygwin. Closes #5451. Thanks to @cc2x for noticing and diagnosing the problem.
This commit is contained in:
@@ -297,7 +297,7 @@ runTectonic verbosity program args' tmpDir' source = do
|
||||
putStrLn "[makePDF] Running"
|
||||
BL.hPutStr stdout out
|
||||
putStr "\n"
|
||||
let pdfFile = tmpDir </> "texput.pdf"
|
||||
let pdfFile = tmpDir ++ "/texput.pdf"
|
||||
(_, pdf) <- getResultingPDF Nothing pdfFile
|
||||
return (exit, out, pdf)
|
||||
|
||||
@@ -335,7 +335,7 @@ runTeXProgram verbosity program args runNumber numRuns tmpDir' source = do
|
||||
[x] -> drop 8 x
|
||||
_ -> tmpDir'
|
||||
liftIO $ createDirectoryIfMissing True tmpDir
|
||||
let file = tmpDir </> "input.tex"
|
||||
let file = tmpDir ++ "/input.tex" -- note: tmpDir has / path separators
|
||||
exists <- liftIO $ doesFileExist file
|
||||
unless exists $ liftIO $ BS.writeFile file $ UTF8.fromText source
|
||||
let isLatexMk = takeBaseName program == "latexmk"
|
||||
|
||||
Reference in New Issue
Block a user