Commits

guesdon  committed 0f44d66

PR#5690: ocamldoc error with -text files with no extension (from rev 12862 in version/4.00)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12863f963ae5c-01c2-4b8c-9fe0-0dff7051ff02

  • Participants
  • Parent commits 6d62602

Comments (0)

Files changed (1)

File ocamldoc/odoc_analyse.ml

       Location.input_name := file;
       try
         let mod_name =
-          String.capitalize (Filename.basename (Filename.chop_extension file))
+          let s =
+            try Filename.chop_extension file
+            with _ -> file
+          in
+          String.capitalize (Filename.basename s)
         in
         let txt =
           try Odoc_text.Texter.text_of_string (Odoc_misc.input_file_as_string file)