"vscode:/vscode.git/clone" did not exist on "7a1da146446d783f1fa41d38e403d04afae453be"
Commit a8edb99d authored by longpanda's avatar longpanda
Browse files

priority key>parent in menu class plugin

parent ac3ab976
......@@ -2488,16 +2488,25 @@ const char * ventoy_plugin_get_menu_class(int type, const char *name, const char
continue;
}
if (node->parent)
if (node->parent == 0)
{
if ((node->patlen < pathlen) && ventoy_plugin_is_parent(node->pattern, node->patlen, path))
if ((node->patlen < namelen) && grub_strstr(name, node->pattern))
{
return node->class;
}
}
else
}
for (node = g_menu_class_head; node; node = node->next)
{
if (node->type != type)
{
if ((node->patlen < namelen) && grub_strstr(name, node->pattern))
continue;
}
if (node->parent)
{
if ((node->patlen < pathlen) && ventoy_plugin_is_parent(node->pattern, node->patlen, path))
{
return node->class;
}
......
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