Skip to content

Commit

Permalink
Use open_in_bin instead of open_in for Windows compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterDA committed Jan 20, 2021
1 parent 48ab696 commit fe2b6cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion unix/capnp_rpc_unix.ml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let parse_uri s =
module Cap_file = struct
let load_uri path =
try
let ch = open_in path in
let ch = open_in_bin path in
let len = in_channel_length ch in
let data = really_input_string ch len in
close_in ch;
Expand Down
2 changes: 1 addition & 1 deletion unix/file_store.ml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ let remove t ~digest =
let load t ~digest =
let path = path_of_digest t digest in
if Sys.file_exists path then (
let ch = open_in path in
let ch = open_in_bin path in
let len = in_channel_length ch in
let segment = Bytes.create len in
really_input ch segment 0 len;
Expand Down

0 comments on commit fe2b6cb

Please sign in to comment.