X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2FmatitaDb.ml;h=b5b64d46f1d958c7d9c02a48a099253bb3137176;hb=f981a524748846acc29b76b6e616af110b4ee13d;hp=0c10a81e855463ce12ca15b3dac8e407854dc0ce;hpb=63722506a5e378f3e05b46612cb91c132d994082;p=helm.git diff --git a/helm/matita/matitaDb.ml b/helm/matita/matitaDb.ml index 0c10a81e8..b5b64d46f 100644 --- a/helm/matita/matitaDb.ml +++ b/helm/matita/matitaDb.ml @@ -66,7 +66,10 @@ let clean_owner_environment () = (fun uri -> let uri = Pcre.replace ~rex:xpointer_RE ~templ:"" uri in List.iter - (fun suffix -> MatitaMisc.safe_remove (uri ^ suffix ^ ".xml.gz")) + (fun suffix -> + try + MatitaMisc.safe_remove (Http_getter.resolve (uri ^ suffix)) + with Http_getter_types.Key_not_found _ -> ()) [""; ".body"; ".types"]) owned_uris; List.iter (fun statement -> @@ -102,6 +105,7 @@ let create_owner_environment () = let status = Mysql.status dbd in match status with | Mysql.StatusError Mysql.Table_exists_error -> () + | Mysql.StatusError Mysql.Dup_keyname -> () | Mysql.StatusError _ -> raise exn | _ -> () ) statements @@ -160,7 +164,3 @@ let xpointers_of_ind uri = Mysql.iter rc (fun a -> match a.(0) with None ->()|Some a -> l := a:: !l); List.map UriManager.uri_of_string !l -let reset_owner_environment () = - clean_owner_environment (); - create_owner_environment () -