Skip to content

Commit

Permalink
Fix Temp.clear_dir
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Sep 3, 2020
1 parent fef8287 commit 1c0dcdd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/stdune/temp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ let clear_dir dir =
let remove_from_set ~set =
set :=
Path.Set.filter !set ~f:(fun f ->
(not (Path.equal f dir)) && Path.is_descendant ~of_:dir f)
let removed =
(not (Path.equal f dir)) && Path.is_descendant ~of_:dir f
in
not removed)
in
remove_from_set ~set:tmp_files;
remove_from_set ~set:tmp_dirs

0 comments on commit 1c0dcdd

Please sign in to comment.