Index: update-mime-database.c =================================================================== --- update-mime-database.c (revision 16170) +++ update-mime-database.c (working copy) @@ -2220,7 +2220,10 @@ write_match (gpointer key, return; } + if (magic->matches) offset = mdata->offset + 32 * g_list_index (mdata->matches, magic->matches->data); + else + offset = 0; if (!write_card32 (mdata->cache, offset)) {