Skip to content

Commit

Permalink
fix race condition in mv where the file might get removed after we ch…
Browse files Browse the repository at this point in the history
…ecked its existance (JuliaLang#42253)
  • Loading branch information
KristofferC authored and LilithHafner committed Mar 8, 2022
1 parent 1872837 commit 3049f6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ function checkfor_mv_cp_cptree(src::AbstractString, dst::AbstractString, txt::Ab
"`src` refers to: $(abs_src)\n ",
"`dst` refers to: $(abs_dst)\n")))
end
rm(dst; recursive=true)
rm(dst; recursive=true, force=true)
else
throw(ArgumentError(string("'$dst' exists. `force=true` ",
"is required to remove '$dst' before $(txt).")))
Expand Down

0 comments on commit 3049f6e

Please sign in to comment.