summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorstuebinm2021-12-16 22:22:56 +0100
committerstuebinm2021-12-16 22:22:56 +0100
commitee73be2822adeea897311eb8caac93291845ff02 (patch)
tree969f97729d78af50320259a39f6075994add3bc0 /lib
parenta318f848178cade371abfa01a36bf15bab6ec58f (diff)
fix a bug when writing things out
(it didn't check if directories to save maps in actually existed)
Diffstat (limited to 'lib')
-rw-r--r--lib/WriteRepo.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/WriteRepo.hs b/lib/WriteRepo.hs
index 7e3e5f2..c1a3f78 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