]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
Fix the false error report about ventoy.jsonxxx file. (#1190)
authorlongpanda <admin@ventoy.net>
Mon, 1 Nov 2021 11:45:53 +0000 (19:45 +0800)
committerlongpanda <admin@ventoy.net>
Mon, 1 Nov 2021 11:45:53 +0000 (19:45 +0800)
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c

index 9f78271f667834667ea1f8575d83d78109937d10..f2e62b63bef36d1b3aab81ca877069819a009651 100644 (file)
@@ -4866,7 +4866,7 @@ static int ventoy_chk_case_file(const char *filename, const struct grub_dirhook_
         return 1;
     }
 
         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;
     {
         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 (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);
         {
             grub_snprintf(path, sizeof(path), "/%s", filename);
             fs_dir->fs->fs_dir(fs_dir->dev, path, ventoy_chk_case_file, path);