ocaml-fileutils/fileutils-0.5.2-fix-bytes.p...

21 lines
751 B
Diff

--- ocaml-fileutils-0.5.2.old/src/FileUtilCP.ml 2017-05-23 21:12:19.000000000 +0100
+++ ocaml-fileutils-0.5.2/src/FileUtilCP.ml 2017-11-08 17:36:42.271524209 +0000
@@ -138,7 +138,7 @@
end
in
- let buffer = String.make 1024 ' ' in
+ let buffer = Bytes.make 1024 ' ' in
let cp_file st_src dst_exists fn_src fn_dst =
let mode = int_of_permission st_src.permission in
@@ -176,7 +176,7 @@
try
while (read :=
handle_exception
- (Unix.read fd_src buffer 0) (String.length buffer)
+ (Unix.read fd_src buffer 0) (Bytes.length buffer)
(fun e -> `ErrorRead(fn_src, e));
!read <> 0) do
let written =