- let obj =
- { uri = strip_suffix theory_suffix fname;
- ann = false; types = No; body = No; proof_tree = No }
- in
- items := Ls_object obj :: !items
+ let fname = strip_suffix ~suffix:xml_suffix fname in
+ let theory_name = strip_suffix ~suffix:theory_suffix fname in
+ let sub_theory = normalize_dir cic_uri_prefix ^ theory_name ^ "/" in
+ if is_empty_theory sub_theory then add_theory fname