diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2004-12-13 19:13:58 +0000 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2004-12-13 19:13:58 +0000 |
commit | 85559a244f3b3e96603e08978ee0226a8dbdf02d (patch) | |
tree | 032ed4f1807bc3381f435716f024a20cfcd2f104 /gtk/xdgmime | |
parent | 7ffcc59b5a36f04045f031201c9af3d15399cd8a (diff) | |
download | gtk+-85559a244f3b3e96603e08978ee0226a8dbdf02d.tar.gz |
Resync with upstream again
2004-12-13 Marco Pesenti Gritti <marco@gnome.org>
* xdgmimeglob.c: (_xdg_glob_hash_lookup_file_name):
Resync with upstream again
Diffstat (limited to 'gtk/xdgmime')
-rw-r--r-- | gtk/xdgmime/ChangeLog | 6 | ||||
-rw-r--r-- | gtk/xdgmime/xdgmimeglob.c | 24 |
2 files changed, 14 insertions, 16 deletions
diff --git a/gtk/xdgmime/ChangeLog b/gtk/xdgmime/ChangeLog index 9420470310..5a7fda9007 100644 --- a/gtk/xdgmime/ChangeLog +++ b/gtk/xdgmime/ChangeLog @@ -1,3 +1,9 @@ +2004-12-13 Marco Pesenti Gritti <marco@gnome.org> + + * xdgmimeglob.c: (_xdg_glob_hash_lookup_file_name): + + Resync with upstream again + Fri Dec 10 13:58:38 2004 Manish Singh <yosh@gimp.org> * xdgmime.h: wrap new API in XDG_ENTRY(). diff --git a/gtk/xdgmime/xdgmimeglob.c b/gtk/xdgmime/xdgmimeglob.c index 1d4ba43c50..e4a849c218 100644 --- a/gtk/xdgmime/xdgmimeglob.c +++ b/gtk/xdgmime/xdgmimeglob.c @@ -296,24 +296,16 @@ _xdg_glob_hash_lookup_file_name (XdgGlobHash *glob_hash, if (strcmp ((const char *)list->data, file_name) == 0) return list->mime_type; - for (ptr = file_name; *ptr != '\000'; ptr = _xdg_utf8_next_char (ptr)) + ptr = strchr (file_name, '.'); + if (ptr) { - if (*ptr == '.') - { - mime_type = (_xdg_glob_hash_node_lookup_file_name (glob_hash->simple_node, ptr, FALSE)); - if (mime_type != NULL) - return mime_type; - } - } + mime_type = (_xdg_glob_hash_node_lookup_file_name (glob_hash->simple_node, ptr, FALSE)); + if (mime_type != NULL) + return mime_type; - for (ptr = file_name; *ptr != '\000'; ptr = _xdg_utf8_next_char (ptr)) - { - if (*ptr == '.') - { - mime_type = (_xdg_glob_hash_node_lookup_file_name (glob_hash->simple_node, ptr, TRUE)); - if (mime_type != NULL) - return mime_type; - } + mime_type = (_xdg_glob_hash_node_lookup_file_name (glob_hash->simple_node, ptr, TRUE)); + if (mime_type != NULL) + return mime_type; } /* FIXME: Not UTF-8 safe */ |