File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -274,15 +274,16 @@ Stacktrace:
274274[...] 
275275``` 
276276""" 
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
278279    if  islink (path) ||  ! isdir (path)
279280        try 
280281            unlink (path)
281282        catch  err
282283            if  isa (err, IOError)
283284                force &&  err. code== Base. UV_ENOENT &&  return 
284285                @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" 
286287                        #  Loaded DLLs cannot be deleted on Windows, even with posix delete mode
287288                        #  but they can be moved. So move out to allow the dir to be deleted
288289                        #  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