From dbc32b5c1cdca97e64d63f9877a0d3b6e1baeaa1 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Thu, 20 Nov 2003 11:30:01 +0000 Subject: [PATCH] The tmp is now cleared from the http___* files. --- helm/ocaml/cic_annotations_cache/cicCache.ml | 8 +++++++- helm/ocaml/cic_cache/cicCache.ml | 20 ++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/helm/ocaml/cic_annotations_cache/cicCache.ml b/helm/ocaml/cic_annotations_cache/cicCache.ml index de5c1926e..088539758 100644 --- a/helm/ocaml/cic_annotations_cache/cicCache.ml +++ b/helm/ocaml/cic_annotations_cache/cicCache.ml @@ -46,11 +46,17 @@ let get_annobj uri = Some (G.getxml (U.cicuri_of_uri bodyuri)) in let annobj = CicParser.annobj_of_xml cicfilename cicbodyfilename in + Unix.unlink cicfilename ; + (match cicbodyfilename with None -> () | Some fn -> Unix.unlink fn) ; annobj, if U.uri_is_annuri uri then begin let annfilename = G.getxml (U.annuri_of_uri uri) in - Some (CicAnnotationParser.get_annotations annfilename) + let res = + Some (CicAnnotationParser.get_annotations annfilename) + in + Unix.unlink annfilename ; + res end else None diff --git a/helm/ocaml/cic_cache/cicCache.ml b/helm/ocaml/cic_cache/cicCache.ml index 1080c39e7..394f9db77 100644 --- a/helm/ocaml/cic_cache/cicCache.ml +++ b/helm/ocaml/cic_cache/cicCache.ml @@ -41,10 +41,17 @@ let get_annobj uri = let cicfilename = G.getxml (U.cicuri_of_uri uri) in match (U.bodyuri_of_uri uri) with None -> - CicParser.annobj_of_xml cicfilename None + let annobj = CicParser.annobj_of_xml cicfilename None in + Unix.unlink cicfilename ; + annobj | Some bodyuri -> let cicbodyfilename = G.getxml (U.cicuri_of_uri bodyuri) in - CicParser.annobj_of_xml cicfilename (Some cicbodyfilename) + let annobj = + CicParser.annobj_of_xml cicfilename (Some cicbodyfilename) + in + Unix.unlink cicfilename ; + Unix.unlink cicbodyfilename ; + annobj ;; let get_obj uri = @@ -53,8 +60,13 @@ let get_obj uri = let cicfilename = G.getxml (U.cicuri_of_uri uri) in match (U.bodyuri_of_uri uri) with None -> - CicParser.obj_of_xml cicfilename None + let obj = CicParser.obj_of_xml cicfilename None in + Unix.unlink cicfilename ; + obj | Some bodyuri -> let cicbodyfilename = G.getxml (U.cicuri_of_uri bodyuri) in - CicParser.obj_of_xml cicfilename (Some cicbodyfilename) + let obj = CicParser.obj_of_xml cicfilename (Some cicbodyfilename) in + Unix.unlink cicfilename ; + Unix.unlink cicbodyfilename ; + obj ;; -- 2.39.2