Skip to content

Commit 1cc1cb8

Browse files
use tempname with suffix for uniqueness
1 parent c28d3fb commit 1cc1cb8

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
@@ -288,7 +288,7 @@ function rm(path::AbstractString; force::Bool=false, recursive::Bool=false, allo
288288
# but they can be moved. So move out to allow the dir to be deleted
289289
# TODO: Add a mechanism to delete these moved files after dlclose or process exit
290290
dir = mkpath(delayed_delete_dir())
291-
temp_path = tempname(dir, cleanup = false) * "_" * basename(path)
291+
temp_path = tempname(dir, cleanup = false, suffix = string("_", basename(path)))
292292
@debug "Could not delete DLL most likely because it is loaded, moving to tempdir" path temp_path
293293
mv(path, temp_path)
294294
return

0 commit comments

Comments
 (0)