@@ -2925,21 +2925,21 @@ function compilecache(pkg::PkgId, path::String, internal_stderr::IO = stderr, in
29252925    end 
29262926end 
29272927
2928- function  rename_unique_ocachefile (tmppath_so, ocachefile_orig, ocachefile =  ocachefile_orig, num =  1 )
2928+ function  rename_unique_ocachefile (tmppath_so:: String , ocachefile_orig:: String , ocachefile:: String  =  ocachefile_orig, num =  1 )
29292929    try 
2930-         rename (tmppath_so, ocachefile:: String ; force= true )
2930+         rename (tmppath_so, ocachefile; force= true )
29312931    catch  e
29322932        e isa  IOError ||  rethrow ()
29332933        #  If `rm` was called on a dir containing a loaded DLL, we moved it to temp for cleanup
29342934        #  on restart. However the old path cannot be used (UV_EACCES) while the DLL is loaded
2935-         if  ! isfile (ocachefile:: String )  ||   ! ( err. code ==  Base. UV_EACCES) 
2935+         if  ! isfile (ocachefile)  &&   err. code !=  Base. UV_EACCES
29362936            rethrow ()
29372937        end 
29382938        #  Windows prevents renaming a file that is in use so if there is a Julia session started
29392939        #  with a package image loaded, we cannot rename that file.
29402940        #  The code belows append a `_i` to the name of the cache file where `i` is the smallest number such that
29412941        #  that cache file does not exist.
2942-         ocachename, ocacheext =  splitext (ocachefile_orig:: String )
2942+         ocachename, ocacheext =  splitext (ocachefile_orig)
29432943        ocachefile_unique =  ocachename *  " _$num " *  ocacheext
29442944        ocachefile =  rename_unique_ocachefile (tmppath_so, ocachefile_orig, ocachefile_unique, num +  1 )
29452945    end 
0 commit comments