Fix bug in Dir_contents (#1085)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
This commit is contained in:
parent
5aa9a07f1a
commit
29d1689f87
|
@ -567,9 +567,14 @@ let rec get sctx ~dir =
|
||||||
in
|
in
|
||||||
Hashtbl.add cache dir t;
|
Hashtbl.add cache dir t;
|
||||||
t
|
t
|
||||||
| Is_component_of_a_group_but_not_the_root _ ->
|
| Is_component_of_a_group_but_not_the_root _ -> begin
|
||||||
(* Filled while scanning the group root *)
|
match Hashtbl.find cache dir with
|
||||||
Option.value_exn (Hashtbl.find cache dir)
|
| 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) ->
|
| Standalone (ft_dir, d) ->
|
||||||
let files = load_text_files sctx ft_dir d in
|
let files = load_text_files sctx ft_dir d in
|
||||||
let t =
|
let t =
|
||||||
|
|
Loading…
Reference in New Issue