Skip to content

Commit 3049f6e

Browse files
KristofferCLilithHafner
authored andcommitted
fix race condition in mv where the file might get removed after we checked its existance (JuliaLang#42253)
1 parent 1872837 commit 3049f6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/file.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ function checkfor_mv_cp_cptree(src::AbstractString, dst::AbstractString, txt::Ab
325325
"`src` refers to: $(abs_src)\n ",
326326
"`dst` refers to: $(abs_dst)\n")))
327327
end
328-
rm(dst; recursive=true)
328+
rm(dst; recursive=true, force=true)
329329
else
330330
throw(ArgumentError(string("'$dst' exists. `force=true` ",
331331
"is required to remove '$dst' before $(txt).")))

0 commit comments

Comments
 (0)