FunView: fix recursive removal.
This commit is contained in:
parent
534dc6af9d
commit
ccfdaa6bd0
@ -577,8 +577,18 @@ module Make (S: Irmin.S) = struct
|
|||||||
| None -> Lwt.return_none
|
| None -> Lwt.return_none
|
||||||
| Some n ->
|
| Some n ->
|
||||||
match Node.read_succ n h with
|
match Node.read_succ n h with
|
||||||
|
| None ->
|
||||||
|
Lwt.return_none
|
||||||
|
| Some child ->
|
||||||
|
aux child p >>= function
|
||||||
| None -> Lwt.return_none
|
| None -> Lwt.return_none
|
||||||
| Some child -> aux child p
|
| Some child -> begin
|
||||||
|
(* remove empty dirs *)
|
||||||
|
Node.is_empty child >>= function
|
||||||
|
| true -> Lwt.return_none
|
||||||
|
| false -> Lwt.return (Some child)
|
||||||
|
end >>= fun child ->
|
||||||
|
Node.with_succ view h child
|
||||||
in
|
in
|
||||||
aux n k >>= function
|
aux n k >>= function
|
||||||
| None -> Lwt.return t
|
| None -> Lwt.return t
|
||||||
|
Loading…
Reference in New Issue
Block a user