diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-07-06 10:39:47 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-07-06 10:39:47 -0700 |
commit | e7f8cc57866b61ed354c4c3812aaced33832a0e0 (patch) | |
tree | 6f36b334448b7b0c6db2eb648b3965ff25ec44c0 /src/Text | |
parent | f88ebf3ebf49e00ffa12778caf6817cc34459e6a (diff) | |
download | pandoc-e7f8cc57866b61ed354c4c3812aaced33832a0e0.tar.gz |
T.P.PDF, convertImage: normalize paths.
This will avoid paths on Windows with mixed path separators,
which may cause problems with SVG conversion.
See #7431.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/PDF.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs index f85ef5b1f..aae3f9806 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -215,9 +215,9 @@ convertImage opts tmpdir fname = do E.catch (Right pngOut <$ JP.savePngImage pngOut img) $ \(e :: E.SomeException) -> return (Left (tshow e)) where - pngOut = replaceDirectory (replaceExtension fname ".png") tmpdir - pdfOut = replaceDirectory (replaceExtension fname ".pdf") tmpdir - svgIn = tmpdir </> fname + pngOut = normalise $ replaceDirectory (replaceExtension fname ".png") tmpdir + pdfOut = normalise $ replaceDirectory (replaceExtension fname ".pdf") tmpdir + svgIn = normalise $ tmpdir </> fname mime = getMimeType fname doNothing = return (Right fname) |