mirror of https://github.com/python/cpython.git
Unlink before rename (for NT).
This commit is contained in:
parent
1aa7e3a177
commit
650b3aad55
|
@ -197,6 +197,10 @@ def mirrorsubdir(f, localdir):
|
|||
fp.close()
|
||||
if fp1 != fp:
|
||||
fp1.close()
|
||||
try:
|
||||
os.unlink(fullname)
|
||||
except os.error:
|
||||
pass # Ignore the error
|
||||
try:
|
||||
os.rename(tempname, fullname)
|
||||
except os.error, msg:
|
||||
|
|
Loading…
Reference in New Issue