Skip to content

Commit

Permalink
Fix the menu missing issue when there exist an invalid vlnk file. (#2228
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ventoy committed Mar 7, 2023
1 parent 2717405 commit 7fa4724
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_browser.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ static int ventoy_browser_iterate_dir(const char *filename, const struct grub_di
return 0;
}

if (grub_file_is_vlnk_suffix(filename, len))
{
return 0;
}

node = grub_zalloc(sizeof(browser_node));
if (!node)
{
Expand Down
4 changes: 4 additions & 0 deletions GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,10 @@ static int ventoy_check_vlnk_data(ventoy_vlnk *vlnk, int print, char *dst, int s
cur->fs->fs_close(&file);
grub_snprintf(dst, size - 1, "(%s)%s", cur->device, vlnk->filepath);
}
else
{
grub_errno = 0;
}
}
}
}
Expand Down

0 comments on commit 7fa4724

Please sign in to comment.