From: Claudio Sacerdoti Coen Date: Mon, 31 May 2004 10:56:06 +0000 (+0000) Subject: theory:path/index.theory are not rewritten to theory:/path.theory X-Git-Tag: pre_subst_in_kernel~45 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=1fd0f95688fb4a8fb612d1164501030588f22a62;p=helm.git theory:path/index.theory are not rewritten to theory:/path.theory if theory:path/index.theory exists in the database. --- diff --git a/helm/ocaml/getter/http_getter_map.ml b/helm/ocaml/getter/http_getter_map.ml index 1b5d209d3..e3a4ab2fc 100644 --- a/helm/ocaml/getter/http_getter_map.ml +++ b/helm/ocaml/getter/http_getter_map.ml @@ -46,7 +46,9 @@ class map dbname = theory:/path/t.theory into theory:/path/t/index.theory when cic:/path/t/ exists *) method private normalize_key key = - if Pcre.pmatch ~rex:index_RE key then + if Pcre.pmatch ~rex:index_RE key && + (try ignore (Dbm.find db key); false with Not_found -> true) + then (* we substitute /index.theory with .theory *) String.sub key 0 (String.length key - 13) ^ ".theory" else key