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