Ignore non-existent dirs when looking for specs

Summary:
In InferPrint, ignore non-existent dirs when looking for specs.  This
allows InferPrint to work when the results dir does not exist.

Reviewed By: sblackshear

Differential Revision: D3522757

fbshipit-source-id: 5ef905d
master
Josh Berdine 9 years ago committed by Facebook Github Bot 4
parent e1403f2a0c
commit 9608504b57

@ -32,7 +32,7 @@ let load_specfiles () =
let specs_files_in_dir dir =
let is_specs_file fname =
not (Sys.is_directory fname) && Filename.check_suffix fname Config.specs_files_suffix in
let all_filenames = Array.to_list (Sys.readdir dir) in
let all_filenames = try Array.to_list (Sys.readdir dir) with Sys_error _ -> [] in
let all_filepaths = IList.map (fun fname -> Filename.concat dir fname) all_filenames in
IList.filter is_specs_file all_filepaths in
let specs_dirs =

Loading…
Cancel
Save