X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fxml%2Fxml.ml;h=0e3a4bcc24a91fbb447869ce8bdbebe64593e076;hb=806ecbdd749ecf2a1cabff52b41cf748fe022401;hp=f8cc41cbeacb7d3404c9548b9932d9565b8c4262;hpb=55b82bd235d82ff7f0a40d980effe1efde1f5073;p=helm.git diff --git a/helm/software/components/xml/xml.ml b/helm/software/components/xml/xml.ml index f8cc41cbe..0e3a4bcc2 100644 --- a/helm/software/components/xml/xml.ml +++ b/helm/software/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 ;;