Skip to content

Commit

Permalink
fix issue ventoy#512
Browse files Browse the repository at this point in the history
show file with name .iso
  • Loading branch information
ventoy committed Oct 8, 2020
1 parent b53e1fb commit 82a8b59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ static int ventoy_colect_img_files(const char *filename, const struct grub_dirho
else
{
debug("Find a file %s\n", filename);
if (len <= 4)
if (len < 4)
{
return 0;
}
Expand All @@ -1211,7 +1211,7 @@ static int ventoy_colect_img_files(const char *filename, const struct grub_dirho
type = img_type_wim;
}
else if (g_vhdboot_enable && (0 == grub_strcasecmp(filename + len - 4, ".vhd") ||
0 == grub_strcasecmp(filename + len - 5, ".vhdx")))
(len >= 5 && 0 == grub_strcasecmp(filename + len - 5, ".vhdx"))))
{
type = img_type_vhd;
}
Expand Down

0 comments on commit 82a8b59

Please sign in to comment.