Skip to content

Commit

Permalink
Fix Run.rm_rf w.r.t. symlinks
Browse files Browse the repository at this point in the history
Sys.is_directory raises if called on a dangling symlink.
  • Loading branch information
dra27 authored and rjbou committed Mar 23, 2021
1 parent c87f980 commit aeee389
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/reftests/run.ml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ let erase_file path =

let rm_rf path =
let rec erase path =
if Sys.is_directory path then begin
if Sys.file_exists path && Sys.is_directory path then begin
Array.iter (fun entry -> erase (Filename.concat path entry))
(Sys.readdir path);
Unix.rmdir path
Expand Down

0 comments on commit aeee389

Please sign in to comment.