From d84b63b172a7be48efebbcd8334b1d7da97402fb Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 5 Jan 2007 18:05:51 +0000 Subject: [PATCH] windows require to remove old_file before doing os.rename(new_file, old_file) --- src/groupchat_control.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 342bb76e0..e6c1e90f9 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -878,6 +878,9 @@ class GroupchatControl(ChatControlBase): os.path.join(path, puny_new_nick + ext) for old_file in files: if os.path.exists(old_file): + if os.path.exists(files[old_file]): + # Windows require this + os.remove(files[old_file]) os.rename(old_file, files[old_file]) self.print_conversation(s, 'info')