]> matita.cs.unibo.it Git - helm.git/commitdiff
bugfix in /ls: removed double trailing "/"
authorStefano Zacchiroli <zack@upsilon.cc>
Wed, 26 May 2004 15:37:45 +0000 (15:37 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Wed, 26 May 2004 15:37:45 +0000 (15:37 +0000)
helm/ocaml/getter/http_getter.ml

index 83dbc0e8c957966b8ea59fd10fa63527f4de75fc..cf2ee593c8ae605225f95af3c3c74a15f70beff0 100644 (file)
@@ -394,10 +394,11 @@ let ls =
       "^([^.]*\\.[^.]*)((\\.body)|(\\.proof_tree)|(\\.types))?(\\.ann)?$"
   in
   let (types_RE, types_ann_RE, body_RE, body_ann_RE,
-       proof_tree_RE, proof_tree_ann_RE) =
+       proof_tree_RE, proof_tree_ann_RE, trailing_slash_RE) =
     (Pcre.regexp "\\.types$", Pcre.regexp "\\.types\\.ann$",
      Pcre.regexp "\\.body$", Pcre.regexp "\\.body\\.ann$",
-     Pcre.regexp "\\.proof_tree$", Pcre.regexp "\\.proof_tree\\.ann$")
+     Pcre.regexp "\\.proof_tree$", Pcre.regexp "\\.proof_tree\\.ann$",
+     Pcre.regexp "/$")
   in
   let (slash_RE, til_slash_RE, no_slashes_RE) =
     (Pcre.regexp "/", Pcre.regexp "^.*/", Pcre.regexp "^[^/]*$")
@@ -407,7 +408,7 @@ let ls =
       ls_remote regexp
     else begin
       let pat =
-        "^" ^ regexp
+        Pcre.replace ~rex:trailing_slash_RE ("^" ^ regexp)
 (*         (match lsuri with Cic p -> ("cic:" ^ p) | Theory p -> ("theory:" ^ p)) *)
       in
       let (dir_RE, obj_RE) =