Skip to content

Commit

Permalink
delete com.file only when we are about to actually generate things (c…
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed Jun 6, 2014
1 parent 11d90f0 commit be263dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1379,9 +1379,6 @@ try
end;
com.config <- get_config com; (* make sure to adapt all flags changes defined after platform *)

(* check file extension. In case of wrong commandline, we don't want
to accidentaly delete a source file. *)
if not !no_output && file_extension com.file = ext then delete_file com.file;
List.iter (fun f -> f()) (List.rev (!pre_compilation));
if !classes = [([],"Std")] && not !force_typing then begin
let help_spec = basic_args_spec @ [
Expand Down Expand Up @@ -1418,6 +1415,9 @@ try
com.modules <- modules;
Filters.run com tctx main;
if ctx.has_error then raise Abort;
(* check file extension. In case of wrong commandline, we don't want
to accidentaly delete a source file. *)
if not !no_output && file_extension com.file = ext then delete_file com.file;
(match !xml_out with
| None -> ()
| Some "hx" ->
Expand Down

0 comments on commit be263dd

Please sign in to comment.