Use user data directory for reference docx archive.

This allows the test suite to work without installing pandoc first.
It also brings the docx writer in line with the odt writer.
This commit is contained in:
John MacFarlane 2015-09-09 10:16:06 -07:00
parent 7f515add58
commit bee255cbfe

View file

@ -211,7 +211,7 @@ writeDocx opts doc@(Pandoc meta _) = do
let doc' = walk fixDisplayMath $ doc
username <- lookup "USERNAME" <$> getEnvironment
utctime <- getCurrentTime
distArchive <- getDefaultReferenceDocx Nothing
distArchive <- getDefaultReferenceDocx datadir
refArchive <- case writerReferenceDocx opts of
Just f -> liftM (toArchive . toLazy) $ B.readFile f
Nothing -> getDefaultReferenceDocx datadir