diff --git a/lib/WriteRepo.hs b/lib/WriteRepo.hs index 7e3e5f2135c8910120cd5fe7adc9cf47cb056631..c1a3f782d0b5fe345e6b5a2f49edc51be923a001 100644 --- a/lib/WriteRepo.hs +++ b/lib/WriteRepo.hs @@ -36,9 +36,9 @@ writeAdjustedRepository config inPath outPath result createDirectoryIfMissing True outPath -- write out all maps - mapM_ - (\(path,out) -> encodeFile (outPath </> path) $ mapresultAdjusted out) - (toList $ dirresultMaps result) + forM_ (toList $ dirresultMaps result) $ \(path,out) -> do + createDirectoryIfMissing True (takeDirectory (outPath </> path)) + encodeFile (outPath </> path) $ mapresultAdjusted out unless (configDontCopyAssets config) $ do -- collect asset dependencies of maps