X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Flibrary%2FlibraryClean.ml;h=a544991e85b109e3df0f74f68b27efaf04c612e5;hb=effab341df3fb2bfe403e51d360e81c8b0455e1a;hp=8b32e97c4fa28cc1467298cb41247225ca05002c;hpb=ee3f8d6fa92b051394a2ff7c71c03ac33a05182b;p=helm.git diff --git a/helm/software/components/library/libraryClean.ml b/helm/software/components/library/libraryClean.ml index 8b32e97c4..a544991e8 100644 --- a/helm/software/components/library/libraryClean.ml +++ b/helm/software/components/library/libraryClean.ml @@ -212,22 +212,30 @@ let clean_baseuris ?(verbose=true) buris = List.iter (fun baseuri -> try + let obj_file = + LibraryMisc.obj_file_of_baseuri ~must_exist:false ~writable:true ~baseuri + in + HExtlib.safe_remove obj_file ; HExtlib.safe_remove - (LibraryMisc.obj_file_of_baseuri ~writable:true ~baseuri); - HExtlib.safe_remove - (LibraryMisc.metadata_file_of_baseuri ~writable:true ~baseuri); + (LibraryMisc.metadata_file_of_baseuri + ~must_exist:false ~writable:true ~baseuri) ; HExtlib.safe_remove - (LibraryMisc.lexicon_file_of_baseuri ~writable:true ~baseuri) + (LibraryMisc.lexicon_file_of_baseuri + ~must_exist:false ~writable:true ~baseuri) ; + HExtlib.rmdir_descend (Filename.chop_extension obj_file) with Http_getter_types.Key_not_found _ -> ()) (HExtlib.list_uniq (List.fast_sort Pervasives.compare - (List.map (UriManager.buri_of_uri) l))); + (List.map (UriManager.buri_of_uri) l @ buris))); List.iter (let last_baseuri = ref "" in fun uri -> let buri = UriManager.buri_of_uri uri in if buri <> !last_baseuri then begin - HLog.message ("Removing: " ^ buri ^ "/*"); + if Helm_registry.get_bool "matita.bench" then + (print_endline ("matitaclean " ^ buri ^ "/");flush stdout) + else + HLog.message ("Removing: " ^ buri ^ "/*"); last_baseuri := buri end; LibrarySync.remove_obj uri