Commit 85559a24 authored by Marco Pesenti Gritti's avatar Marco Pesenti Gritti Committed by Marco Pesenti Gritti
Browse files

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
parent 7ffcc59b
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().
......
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment