From b04bb3b6d279cf50a4a8f67ccda00afd9c4a5a28 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Tue, 5 Aug 2014 11:02:23 +0100 Subject: MediaBag: Improved normalisation when writing files --- src/Text/Pandoc/MediaBag.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text/Pandoc/MediaBag.hs') diff --git a/src/Text/Pandoc/MediaBag.hs b/src/Text/Pandoc/MediaBag.hs index 667089f55..b19804b5f 100644 --- a/src/Text/Pandoc/MediaBag.hs +++ b/src/Text/Pandoc/MediaBag.hs @@ -99,7 +99,7 @@ writeMedia :: Bool -> FilePath -> (FilePath, BL.ByteString) -> IO () writeMedia verbose dir (subpath, bs) = do -- we join and split to convert a/b/c to a\b\c on Windows; -- in zip containers all paths use / - let fullpath = dir joinPath (splitPath subpath) + let fullpath = dir normalise subpath createDirectoryIfMissing True $ takeDirectory fullpath when verbose $ UTF8.hPutStrLn stderr $ "pandoc: extracting " ++ fullpath BL.writeFile fullpath bs -- cgit v1.2.3