From: longpanda Date: Mon, 1 Nov 2021 11:45:53 +0000 (+0800) Subject: Fix the false error report about ventoy.jsonxxx file. (#1190) X-Git-Tag: v1.0.58~12 X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/commitdiff_plain/f842d46f904e1387dbabed3147da6924e2f8fd44?ds=sidebyside Fix the false error report about ventoy.jsonxxx file. (#1190) --- diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c index 9f78271..f2e62b6 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c @@ -4866,7 +4866,7 @@ static int ventoy_chk_case_file(const char *filename, const struct grub_dirhook_ return 1; } - if (0 == info->dir && grub_strncasecmp(filename, "ventoy.json", 11) == 0) + if (0 == info->dir && grub_strcasecmp(filename, "ventoy.json") == 0) { grub_snprintf(g_json_case_mis_path, 32, "%s/%s", (char *)data, filename); return 1; @@ -4886,7 +4886,7 @@ static int ventoy_chk_case_dir(const char *filename, const struct grub_dirhook_i if (info->dir && (filename[0] == 'v' || filename[0] == 'V')) { - if (grub_strncasecmp(filename, "ventoy", 6) == 0) + if (grub_strcasecmp(filename, "ventoy") == 0) { grub_snprintf(path, sizeof(path), "/%s", filename); fs_dir->fs->fs_dir(fs_dir->dev, path, ventoy_chk_case_file, path);