From 81de5e159076e1392ffa90b13bee4e560e30414b Mon Sep 17 00:00:00 2001 From: KristofferC Date: Wed, 15 Sep 2021 10:03:49 +0200 Subject: [PATCH] fix race condition in mv where the file might get removed after we checked its existance --- base/file.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/file.jl b/base/file.jl index 85450ff2d3645..a600b9ce4bdab 100644 --- a/base/file.jl +++ b/base/file.jl @@ -321,7 +321,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).")))