diff options
author | Martin Wehner <martin.wehner@gmail.com> | 2007-07-30 21:24:02 +0000 |
---|---|---|
committer | Martin Wehner <mwehner@src.gnome.org> | 2007-07-30 21:24:02 +0000 |
commit | 91e09c9f8c2eda215f560a12d4713facca565eb5 (patch) | |
tree | b1519f12a4d55eb657f2d80262a5b5f775a9f36d | |
parent | 333a99678be16244fdcac1416a86f64653d602ee (diff) | |
download | nautilus-91e09c9f8c2eda215f560a12d4713facca565eb5.tar.gz |
Don't try to lowercase non-unicode filenames with g_utf8_strdown. Fixes
2007-07-30 Martin Wehner <martin.wehner@gmail.com>
* libnautilus-private/nautilus-search-engine-simple.c:
(search_visit_func): Don't try to lowercase non-unicode
filenames with g_utf8_strdown. Fixes #454799.
Patch from Jan de Groot <jan@jgc.homeip.net>
svn path=/branches/gnome-2-18/; revision=13034
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | libnautilus-private/nautilus-search-engine-simple.c | 10 |
2 files changed, 14 insertions, 3 deletions
@@ -1,3 +1,10 @@ +2007-07-30 Martin Wehner <martin.wehner@gmail.com> + + * libnautilus-private/nautilus-search-engine-simple.c: + (search_visit_func): Don't try to lowercase non-unicode + filenames with g_utf8_strdown. Fixes #454799. + Patch from Jan de Groot <jan@jgc.homeip.net> + === nautilus 2.18.3 === 2007-07-02 Martin Wehner <martin.wehner@gmail.com> diff --git a/libnautilus-private/nautilus-search-engine-simple.c b/libnautilus-private/nautilus-search-engine-simple.c index 83ebfb606..15c3b35f5 100644 --- a/libnautilus-private/nautilus-search-engine-simple.c +++ b/libnautilus-private/nautilus-search-engine-simple.c @@ -213,8 +213,13 @@ search_visit_func (const gchar *rel_path, hit = FALSE; if (!is_hidden) { - normalized = g_utf8_normalize (info->name, -1, G_NORMALIZE_NFD); - lower_name = g_utf8_strdown (normalized, -1); + if (g_utf8_validate (info->name, -1, NULL)) { + normalized = g_utf8_normalize (info->name, -1, G_NORMALIZE_NFD); + lower_name = g_utf8_strdown (normalized, -1); + g_free (normalized); + } else { + lower_name = g_ascii_strdown (info->name, -1); + } hit = TRUE; for (i = 0; data->words[i] != NULL; i++) { @@ -224,7 +229,6 @@ search_visit_func (const gchar *rel_path, } } g_free (lower_name); - g_free (normalized); } if (hit && data->mime_types != NULL) { |