forked from enlightenment/efl
Efreet_Mime: fix subrules with non-zero depth.
Hello, I've fixed a bug in parsing magic file in Efreet_Mime: if some magic rule has a subrule with non-zero depth, then the 0 depth is used instead for subrule. This led to nonsense like all .xml documents matched as application/docbook+xml. By: Mikhail Gusarov SVN revision: 41304
This commit is contained in:
parent
84be18a101
commit
9aef9f5eca
|
@ -1049,6 +1049,7 @@ efreet_mime_shared_mimeinfo_magic_parse(char *data, int size)
|
||||||
ptr = ++val;
|
ptr = ++val;
|
||||||
|
|
||||||
while (*ptr != '\n') ptr++;
|
while (*ptr != '\n') ptr++;
|
||||||
|
ptr++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1070,7 +1071,6 @@ efreet_mime_shared_mimeinfo_magic_parse(char *data, int size)
|
||||||
entry->range_len = 1;
|
entry->range_len = 1;
|
||||||
entry->mask = NULL;
|
entry->mask = NULL;
|
||||||
entry->value = NULL;
|
entry->value = NULL;
|
||||||
ptr++;
|
|
||||||
|
|
||||||
mime->entries = eina_list_append(mime->entries, entry);
|
mime->entries = eina_list_append(mime->entries, entry);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue