X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fextlib%2FhExtlib.ml;h=5761010531eca5fe6a0b40c57eee94c0d2a8daa7;hb=1c8e7170469dd7859fcf15dc76b3162d494cd848;hp=0b13cd83e4566013b74ec3b18019c4d2e542482d;hpb=2c01ff6094173915e7023076ea48b5804dca7778;p=helm.git diff --git a/matita/components/extlib/hExtlib.ml b/matita/components/extlib/hExtlib.ml index 0b13cd83e..576101053 100644 --- a/matita/components/extlib/hExtlib.ml +++ b/matita/components/extlib/hExtlib.ml @@ -437,6 +437,7 @@ let mkdir path = Unix.mkdir path 0o755; chmod 0o2775 path with | Unix.Unix_error (Unix.EEXIST,_,_) -> () + | Unix.Unix_error (Unix.EISDIR,_,_) -> () (* work-around for a bug in FreeBSD *) | Unix.Unix_error (e,_,_) -> raise (Failure @@ -459,12 +460,12 @@ let input_file fname = let input_all ic = let size = 10240 in let buf = Buffer.create size in - let s = String.create size in + let s = Bytes.create size in (try while true do let bytes = input ic s 0 size in if bytes = 0 then raise End_of_file - else Buffer.add_substring buf s 0 bytes + else Buffer.add_subbytes buf s 0 bytes done with End_of_file -> ()); Buffer.contents buf