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
This commit is contained in:
Marco Pesenti Gritti 2004-12-13 19:13:58 +00:00 committed by Marco Pesenti Gritti
parent 7ffcc59b5a
commit 85559a244f
2 changed files with 14 additions and 16 deletions

View File

@ -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().

View File

@ -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 */