File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 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)
281281                    if  err. code== Base. UV_EACCES &&  endswith (path, " .dll" 
282282                        #  Loaded DLLs cannot be deleted on Windows, even with posix delete mode
283283                        #  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" 
288+                         mv (path, temp_path)
286289                    end 
287290                end 
288291            end 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments