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@12863 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Maxence Guesdon 2012-08-16 09:46:33 +00:00
parent d165ca651e
commit c33ee6cd27
1 changed files with 5 additions and 1 deletions

View File

@ -234,7 +234,11 @@ let process_file ppf sourcefile =
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)