File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -281,8 +281,11 @@ function rm(path::AbstractString; force::Bool=false, recursive::Bool=false)
281
281
if err. code== Base. UV_EACCES && endswith (path, " .dll" )
282
282
# Loaded DLLs cannot be deleted on Windows, even with posix delete mode
283
283
# but they can be moved. So move out to allow the dir to be deleted
284
- # and DLL deleted via the temp dir cleanup on next reboot
285
- mv (path, tempname () * " _" * basename (path))
284
+ # TODO : Add a mechanism to delete these moved files after dlclose or process exit
285
+ dir = mkpath (joinpath (tempdir (), " julia_delayed_deletes" ))
286
+ temp_path = tempname (dir, cleanup = false ) * " _" * basename (path)
287
+ @debug " Could not delete DLL most likely because it is loaded, moving to tempdir" path temp_path
288
+ mv (path, temp_path)
286
289
end
287
290
end
288
291
end
You can’t perform that action at this time.
0 commit comments