summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2017-10-16 13:02:45 +0100
committerDavid Woodhouse <dwmw@amazon.co.uk>2017-10-16 13:02:45 +0100
commit23b57e3a1d61c50ed16abd3194845d41aa6e3a48 (patch)
tree1254ea012c1d0da26c5c43324af43c2f60e31ed8
parent4e0d38dec2c9bd84cd88ff2039c93522af884974 (diff)
downloadpidgin-23b57e3a1d61c50ed16abd3194845d41aa6e3a48.tar.gz
Do not rewrite custom buddy icons already in the cache (#17259)
-rw-r--r--libpurple/buddyicon.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libpurple/buddyicon.c b/libpurple/buddyicon.c
index 7f5a290539..14e03c09b9 100644
--- a/libpurple/buddyicon.c
+++ b/libpurple/buddyicon.c
@@ -174,8 +174,12 @@ purple_buddy_icon_data_cache(PurpleStoredImage *img)
}
}
- purple_util_write_data_to_file_absolute(path, purple_imgstore_get_data(img),
- purple_imgstore_get_size(img));
+ if (!g_file_test(path, G_FILE_TEST_IS_REGULAR))
+ {
+ purple_util_write_data_to_file_absolute(path, purple_imgstore_get_data(img),
+ purple_imgstore_get_size(img));
+ }
+
g_free(path);
}