Commit 650b3aad authored by Guido van Rossum's avatar Guido van Rossum

Unlink before rename (for NT).

parent 1aa7e3a1
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment