summaryrefslogtreecommitdiff
path: root/src/Translate.ml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Translate.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Translate.ml b/src/Translate.ml
index 1a42892d..5812dc89 100644
--- a/src/Translate.ml
+++ b/src/Translate.ml
@@ -639,6 +639,12 @@ let translate_module (filename : string) (dest_dir : string) (config : config)
}
in
+ (* Create the directory, if necessary *)
+ if not (Sys.file_exists dest_dir) then (
+ log#linfo (lazy ("Creating missing directory: " ^ dest_dir));
+ (* Create a directory with *default* permissions *)
+ Core.Unix.mkdir_p dest_dir);
+
(* Extract one or several files, depending on the configuration *)
if config.split_files then (
let base_gen_config =