diff --git a/eio/tar_eio.ml b/eio/tar_eio.ml index 60d6c68..597155d 100644 --- a/eio/tar_eio.ml +++ b/eio/tar_eio.ml @@ -56,7 +56,7 @@ let run t f = let buffer_size = 32768 in let buffer = Cstruct.create buffer_size in let rec loop (n: int) = - if n <= 0 then Ok (-1) (* XXX: I dunno... *) + if n <= 0 then Ok () else let amount = min n buffer_size in let block = Cstruct.sub buffer 0 amount in diff --git a/unix/tar_unix.ml b/unix/tar_unix.ml index b64dac0..2f4c0cd 100644 --- a/unix/tar_unix.ml +++ b/unix/tar_unix.ml @@ -46,7 +46,6 @@ type decode_error = [ | `Fatal of Tar.error | `Unix of Unix.error * string * string | `Unexpected_end_of_file - | `Msg of string ] let pp_decode_error ppf = function diff --git a/unix/tar_unix.mli b/unix/tar_unix.mli index eda3e75..122d532 100644 --- a/unix/tar_unix.mli +++ b/unix/tar_unix.mli @@ -44,7 +44,7 @@ val fold : val extract : ?filter:(Tar.Header.t -> bool) -> src:string -> string -> - (unit, [> `Exn of exn | decode_error ]) result + (unit, [> `Exn of exn | `Msg of string | decode_error ]) result (** [create ~level ~filter ~src dst] creates a tar archive at [dst]. It uses [src], a directory name, as input. If [filter] is provided