]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaclean.ml
matitamake stuff:
[helm.git] / helm / matita / matitaclean.ml
index 69af9bf05078e954c0628116ed2d48766f085e33..df6fdfecb6c09457a9c14f7952ba84d2e43ecd5d 100644 (file)
@@ -37,7 +37,14 @@ let _ =
         with
           UM.IllFormedUri _ ->
            files_to_remove := suri :: !files_to_remove;
-           MatitacleanLib.baseuri_of_file suri
+           let u = MatitacleanLib.baseuri_of_file suri in
+           if String.length u < 5 || String.sub u 0 5 <> "cic:/" then
+             begin
+               MatitaLog.error ("File " ^ suri ^ " defines a bad baseuri: "^u);
+               exit 1
+             end
+           else
+             u
       in
       uris_to_remove := uri :: !uris_to_remove
     done
@@ -45,5 +52,7 @@ let _ =
     Invalid_argument _ -> usage ());
   main !uris_to_remove;
   let moos = List.map MatitaMisc.obj_file_of_script !files_to_remove in
-   List.iter
-    (fun s -> try Unix.unlink s with Unix.Unix_error _ -> ()) moos
+  List.iter
+    (fun s -> try Unix.unlink s with Unix.Unix_error _ -> ()) 
+    moos
+