prevent a traceback when saving vcard on HD.

This commit is contained in:
Yann Leboulanger 2006-10-06 13:00:50 +00:00
parent 8eb1c7ce75
commit b06c56a3fc
1 changed files with 2 additions and 0 deletions

View File

@ -820,6 +820,8 @@ class ConnectionVcard:
puny_jid = helpers.sanitize_filename(jid) puny_jid = helpers.sanitize_filename(jid)
path = os.path.join(gajim.VCARD_PATH, puny_jid) path = os.path.join(gajim.VCARD_PATH, puny_jid)
if jid in self.room_jids or os.path.isdir(path): if jid in self.room_jids or os.path.isdir(path):
if not nick:
return
# remove room_jid file if needed # remove room_jid file if needed
if os.path.isfile(path): if os.path.isfile(path):
os.remove(path) os.remove(path)