Index: xdgmimeglob.c
===================================================================
RCS file: /cvs/mime/xdgmime/src/xdgmimeglob.c,v
retrieving revision 1.10
diff -u -r1.10 xdgmimeglob.c
--- xdgmimeglob.c	9 Dec 2004 14:41:28 -0000	1.10
+++ xdgmimeglob.c	12 Dec 2004 20:55:55 -0000
@@ -296,24 +296,16 @@
     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;
-	}
-    }
-
-  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, FALSE));
+      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 */
