prevent file rename when new nick is the same as old nick.

This commit is contained in:
Yann Leboulanger 2007-10-15 20:16:57 +00:00
parent 2606e127d1
commit 37851df6e9

View file

@ -1006,7 +1006,7 @@ class GroupchatControl(ChatControlBase):
files[os.path.join(path, puny_nick + ext)] = \
os.path.join(path, puny_new_nick + ext)
for old_file in files:
if os.path.exists(old_file):
if os.path.exists(old_file) and old_file != files[old_file]:
if os.path.exists(files[old_file]):
# Windows require this
os.remove(files[old_file])