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

Unlink before rename (for NT).

parent 1aa7e3a1
...@@ -197,6 +197,10 @@ def mirrorsubdir(f, localdir): ...@@ -197,6 +197,10 @@ def mirrorsubdir(f, localdir):
fp.close() fp.close()
if fp1 != fp: if fp1 != fp:
fp1.close() fp1.close()
try:
os.unlink(fullname)
except os.error:
pass # Ignore the error
try: try:
os.rename(tempname, fullname) os.rename(tempname, fullname)
except os.error, msg: except os.error, msg:
......
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