X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=components%2Fxml%2Fxml.ml;h=0e3a4bcc24a91fbb447869ce8bdbebe64593e076;hb=249d11773d32add20d665c4f8521b7380e4fec0a;hp=f8cc41cbeacb7d3404c9548b9932d9565b8c4262;hpb=7f2444c2670cadafddd8785b687ef312158376b0;p=helm.git diff --git a/components/xml/xml.ml b/components/xml/xml.ml index f8cc41cbe..0e3a4bcc2 100644 --- a/components/xml/xml.ml +++ b/components/xml/xml.ml @@ -123,23 +123,27 @@ let pp ?(gzip=false) strm fn = match fn with | Some filename -> let outchan = Gzip.open_out filename in - (try + begin try pp_to_gzipchan strm outchan; with e -> Gzip.close_out outchan; - raise e); - Gzip.close_out outchan + raise e + end; + Gzip.close_out outchan; + HExtlib.chmod 0o664 filename; | None -> failwith "Can't sent gzipped output to stdout" else match fn with | Some filename -> let outchan = open_out filename in - (try + begin try pp_to_outchan strm outchan; with e -> close_out outchan; - raise e); - close_out outchan + raise e + end; + close_out outchan; + HExtlib.chmod 0o664 filename | None -> pp_to_outchan strm stdout ;;