Bläddra i källkod

create directory before creating file...

Simon Krajewski 1 år sedan
förälder
incheckning
1625bbf0da
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      src/compiler/generate.ml

+ 1 - 1
src/compiler/generate.ml

@@ -41,11 +41,11 @@ let check_hxb_output com actx =
 	begin match actx.hxb_out with
 	begin match actx.hxb_out with
 		| None -> ()
 		| None -> ()
 		| Some path ->
 		| Some path ->
+			Path.mkdir_from_path path;
 			let zip = new Zip_output.zip_output path 6 in
 			let zip = new Zip_output.zip_output path 6 in
 			let export com =
 			let export com =
 				Common.log com ("Generating hxb to " ^ path);
 				Common.log com ("Generating hxb to " ^ path);
 				Printf.eprintf "Generating hxb to %s\n" path;
 				Printf.eprintf "Generating hxb to %s\n" path;
-				Path.mkdir_from_path path;
 				let t = Timer.timer ["generate";"hxb"] in
 				let t = Timer.timer ["generate";"hxb"] in
 				Printf.eprintf "%d modules, %d types\n" (List.length com.modules) (List.length com.types);
 				Printf.eprintf "%d modules, %d types\n" (List.length com.modules) (List.length com.types);
 				let target = Common.platform_name_macro com in
 				let target = Common.platform_name_macro com in