git.iko.soy/typeable/pandoc
on master help sign in
Text.Pandoc.Class.writeMedia: unescape URI-escaping in file path.
b15f4f4John MacFarlane
src/Text/Pandoc/Class.hs+1−1
@@ -855,7 +855,7 @@ writeMedia :: FilePath -> MediaBag -> FilePath -> PandocIO ()
855writeMedia dir mediabag subpath = do
855writeMedia dir mediabag subpath = do
856 -- we join and split to convert a/b/c to a\b\c on Windows;
856 -- we join and split to convert a/b/c to a\b\c on Windows;
857 -- in zip containers all paths use /
857 -- in zip containers all paths use /
858− let fullpath = dir </> normalise subpath
858+ let fullpath = dir </> unEscapeString (normalise subpath)
859 let mbcontents = lookupMedia subpath mediabag
859 let mbcontents = lookupMedia subpath mediabag
860 case mbcontents of
860 case mbcontents of
861 Nothing -> throwError $ PandocResourceNotFound subpath
861 Nothing -> throwError $ PandocResourceNotFound subpath