prevent a traceback when saving vcard on HD.
This commit is contained in:
parent
8eb1c7ce75
commit
b06c56a3fc
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue