Skip to content

Commit

Permalink
Avoid error if temp_dir acquires .DS_Store file (JuliaLang#19894)
Browse files Browse the repository at this point in the history
Issue JuliaLang#19873. If the macOS Finder inserts a .DS_Store file while Pkg.update/Pkg.add operation is in progress, a plain `rm(temp_dir)` will not succeed.
  • Loading branch information
cormullion authored and tkelman committed Jan 16, 2017
1 parent 35b3470 commit ca3b06e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/pkg/dir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function init(meta::AbstractString=DEFAULT_META, branch::AbstractString=META_BRA
Base.mv(joinpath(temp_dir,"METADATA"), metadata_dir)
Base.mv(joinpath(temp_dir,"REQUIRE"), joinpath(dir,"REQUIRE"))
Base.mv(joinpath(temp_dir,"META_BRANCH"), joinpath(dir,"META_BRANCH"))
rm(temp_dir)
rm(temp_dir, recursive=true)
catch err
ispath(metadata_dir) && rm(metadata_dir, recursive=true)
ispath(temp_dir) && rm(temp_dir, recursive=true)
Expand Down

0 comments on commit ca3b06e

Please sign in to comment.