File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -274,15 +274,16 @@ Stacktrace:
274
274
[...]
275
275
```
276
276
"""
277
- function rm (path:: AbstractString ; force:: Bool = false , recursive:: Bool = false )
277
+ function rm (path:: AbstractString ; force:: Bool = false , recursive:: Bool = false , allow_delayed_delete:: Bool = true )
278
+ # allow_delayed_delete is used by Pkg.gc() but is otherwise not part of the public API
278
279
if islink (path) || ! isdir (path)
279
280
try
280
281
unlink (path)
281
282
catch err
282
283
if isa (err, IOError)
283
284
force && err. code== Base. UV_ENOENT && return
284
285
@static if Sys. iswindows ()
285
- if err. code== Base. UV_EACCES && endswith (path, " .dll" )
286
+ if allow_delayed_delete && err. code== Base. UV_EACCES && endswith (path, " .dll" )
286
287
# Loaded DLLs cannot be deleted on Windows, even with posix delete mode
287
288
# but they can be moved. So move out to allow the dir to be deleted
288
289
# TODO : Add a mechanism to delete these moved files after dlclose or process exit
You can’t perform that action at this time.
0 commit comments