Skip to content

Commit

Permalink
save resources in file in binary mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Jul 5, 2012
1 parent 490163e commit ba4e75b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion genas3.ml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ let generate_resources infos =
let dir = (infos.com.file :: ["__res"]) in
create_dir [] dir;
let add_resource name data =
Std.output_file (String.concat "/" (dir @ [name])) data
let ch = open_out_bin (String.concat "/" (dir @ [name])) in
output_string ch data;
close_out ch
in
Hashtbl.iter (fun name data -> add_resource name data) infos.com.resources;
let ctx = init infos ([],"__resources__") in
Expand Down

0 comments on commit ba4e75b

Please sign in to comment.