From fc1d6ff2801907a077f2b6ffc3ddd6829ecbadfa Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 18 Jan 2006 16:31:35 +0000 Subject: [PATCH] also save avatar file when sha has not changed but we don't have avatar file on HD, see #1246 --- src/common/connection.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/connection.py b/src/common/connection.py index 80469311e..d1cf17004 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -307,9 +307,11 @@ class Connection: fil.close() # Save the decoded avatar to a separate file too, and generate files for dbus notifications if photo_decoded: + avatar_file = os.path.join(gajim.AVATAR_PATH, frm + '_notif_size_colored.png') if frm == our_jid and avatar_sha != self.vcard_sha: gajim.interface.save_avatar_files(frm, photo_decoded) - elif frm != our_jid and (not self.vcard_shas.has_key(frm) or \ + elif frm != our_jid and (not os.path.exists(avatar_file) or \ + not self.vcard_shas.has_key(frm) or \ avatar_sha != self.vcard_shas[frm]): gajim.interface.save_avatar_files(frm, photo_decoded)