File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -46,16 +46,20 @@ end = struct
4646 let unit_cache = Hashtbl. create 42 in
4747 List. iter
4848 (fun directory ->
49- let files = Sys. readdir (Fs.Directory. to_string directory) in
50- Array. iter
51- (fun file ->
52- let file = Fpath. v file in
53- if Fpath. has_ext " odoc" file then
54- Hashtbl. add unit_cache
55- (Astring.String.Ascii. capitalize
56- (file |> Fpath. rem_ext |> Fpath. basename))
57- (Fs.File. append directory file))
58- files)
49+ try
50+ let files = Sys. readdir (Fs.Directory. to_string directory) in
51+ Array. iter
52+ (fun file ->
53+ let file = Fpath. v file in
54+ if Fpath. has_ext " odoc" file then
55+ Hashtbl. add unit_cache
56+ (Astring.String.Ascii. capitalize
57+ (file |> Fpath. rem_ext |> Fpath. basename))
58+ (Fs.File. append directory file))
59+ files
60+ with Sys_error _ ->
61+ (* TODO: Raise a warning if a directory given as -I cannot be opened *)
62+ () )
5963 directories;
6064 unit_cache
6165
You can’t perform that action at this time.
0 commit comments