##// END OF EJS Templates
windows.rename: check OSError for EEXIST...
Adrian Buehlmann -
r13278:e9a52ed2 default
parent child Browse files
Show More
@@ -289,7 +289,9 b' def rename(src, dst):'
289 '''atomically rename file src to dst, replacing dst if it exists'''
289 '''atomically rename file src to dst, replacing dst if it exists'''
290 try:
290 try:
291 os.rename(src, dst)
291 os.rename(src, dst)
292 except OSError: # FIXME: check err (EEXIST ?)
292 except OSError, e:
293 if e.errno != errno.EEXIST:
294 raise
293
295
294 # On windows, rename to existing file is not allowed, so we
296 # On windows, rename to existing file is not allowed, so we
295 # must delete destination first. But if a file is open, unlink
297 # must delete destination first. But if a file is open, unlink
General Comments 0
You need to be logged in to leave comments. Login now