diff options
author | Maxence Guesdon <maxence.guesdon@inria.fr> | 2012-08-16 09:46:33 +0000 |
---|---|---|
committer | Maxence Guesdon <maxence.guesdon@inria.fr> | 2012-08-16 09:46:33 +0000 |
commit | c33ee6cd27340b6abe7cfda3527c95cefb6f5a93 (patch) | |
tree | 00be4e4cf6b56dccc6f798cbfce4e1d987b916e6 | |
parent | d165ca651e5c5446598613d7f55b698d24aaeeab (diff) |
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
-rw-r--r-- | ocamldoc/odoc_analyse.ml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ocamldoc/odoc_analyse.ml b/ocamldoc/odoc_analyse.ml index b584576cf..9eec860a0 100644 --- a/ocamldoc/odoc_analyse.ml +++ b/ocamldoc/odoc_analyse.ml @@ -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) |