- let value =
- if name = "baseuri" then
- let v = MatitaMisc.strip_trailing_slash value in
- try
- ignore (String.index v ' ');
- command_error "baseuri can't contain spaces"
- with Not_found -> v
- else
- value
+ let status =
+ if name = "baseuri" then begin
+ let value =
+ let v = MatitaMisc.strip_trailing_slash value in
+ try
+ ignore (String.index v ' ');
+ command_error "baseuri can't contain spaces"
+ with Not_found -> v
+ in
+ if not (MatitaMisc.is_empty value) && opts.clean_baseuri then begin
+ MatitaLog.warn ("baseuri " ^ value ^ " is not empty");
+ MatitaLog.message ("cleaning baseuri " ^ value);
+ MatitacleanLib.clean_baseuris [value]
+ end;
+ add_moo_metadata [GrafiteAst.Baseuri value] status
+ end else
+ status