Updating branch refs/heads/master to ac181a2f954dce0e243eb467d3e20dcb81bca9e5 (commit) from 27fb36bca2d3a94cd3d486bcd7117f07f1abe3d0 (commit)
commit ac181a2f954dce0e243eb467d3e20dcb81bca9e5 Author: Nick Schermer <n...@xfce.org> Date: Sat Dec 8 12:13:54 2012 +0100 Don't use collate to check strings. Valgrind shows a lot of context errors in this code and it makes no sence to do this because uri are not locale strings. plugins/xdg-cache/xdg-cache-cache.c | 5 +++-- plugins/xdg-cache/xdg-cache-thumbnail.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/xdg-cache/xdg-cache-cache.c b/plugins/xdg-cache/xdg-cache-cache.c index fb0d59a..435726e 100644 --- a/plugins/xdg-cache/xdg-cache-cache.c +++ b/plugins/xdg-cache/xdg-cache-cache.c @@ -640,13 +640,14 @@ xdg_cache_cache_read_thumbnail_info (const gchar *filename, { if (!text_ptr[i].key) continue; - else if (g_utf8_collate ("Thumb::URI", text_ptr[i].key) == 0) + + if (strcmp ("Thumb::URI", text_ptr[i].key) == 0) { /* remember the Thumb::URI value */ *uri = g_strdup (text_ptr[i].text); has_uri = TRUE; } - else if (g_utf8_collate ("Thumb::MTime", text_ptr[i].key) == 0) + else if (strcmp ("Thumb::MTime", text_ptr[i].key) == 0) { /* remember the Thumb::MTime value */ if (text_ptr[i].text != NULL) diff --git a/plugins/xdg-cache/xdg-cache-thumbnail.c b/plugins/xdg-cache/xdg-cache-thumbnail.c index 71448a8..ea6a0d8 100644 --- a/plugins/xdg-cache/xdg-cache-thumbnail.c +++ b/plugins/xdg-cache/xdg-cache-thumbnail.c @@ -281,7 +281,7 @@ xdg_cache_thumbnail_needs_update (TumblerThumbnail *thumbnail, if (cache_thumbnail->cached_mtime == 0) return TRUE; - return g_utf8_collate (cache_thumbnail->uri, uri) != 0 + return strcmp (cache_thumbnail->uri, uri) != 0 || cache_thumbnail->cached_mtime != mtime; } _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits