Fix bug in Dir_contents (#1085)

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
This commit is contained in:
Jérémie Dimino 2018-08-02 10:58:42 +01:00 committed by GitHub
parent 5aa9a07f1a
commit 29d1689f87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -567,9 +567,14 @@ let rec get sctx ~dir =
in
Hashtbl.add cache dir t;
t
| Is_component_of_a_group_but_not_the_root _ ->
(* Filled while scanning the group root *)
Option.value_exn (Hashtbl.find cache dir)
| Is_component_of_a_group_but_not_the_root _ -> begin
match Hashtbl.find cache dir with
| Some t -> t
| None ->
ignore (get sctx ~dir:(Path.parent_exn dir) : t);
(* Filled while scanning the group root *)
Option.value_exn (Hashtbl.find cache dir)
end
| Standalone (ft_dir, d) ->
let files = load_text_files sctx ft_dir d in
let t =