Skip to content

Commit

Permalink
use tempname with suffix for uniqueness
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Feb 26, 2024
1 parent c28d3fb commit 1cc1cb8
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 @@ -288,7 +288,7 @@ function rm(path::AbstractString; force::Bool=false, recursive::Bool=false, allo
# but they can be moved. So move out to allow the dir to be deleted
# TODO: Add a mechanism to delete these moved files after dlclose or process exit
dir = mkpath(delayed_delete_dir())
temp_path = tempname(dir, cleanup = false) * "_" * basename(path)
temp_path = tempname(dir, cleanup = false, suffix = string("_", basename(path)))
@debug "Could not delete DLL most likely because it is loaded, moving to tempdir" path temp_path
mv(path, temp_path)
return
Expand Down

0 comments on commit 1cc1cb8

Please sign in to comment.