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
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
+