+static int ventoy_path_is_real_exist(const char *path, void *head, size_t pathoff, size_t nextoff)
+{
+ char *node = NULL;
+ const char *nodepath = NULL;
+ const char *realpath = NULL;
+ char pathbuf[MAX_PATH];
+
+ if (strchr(path, '*'))
+ {
+ return 0;
+ }
+
+ realpath = ventoy_real_path(path);
+ scnprintf(pathbuf, sizeof(pathbuf), "%s", realpath);
+
+ node = (char *)head;
+ while (node)
+ {
+ nodepath = node + pathoff;
+ if (NULL == strchr(nodepath, '*'))
+ {
+ realpath = ventoy_real_path(nodepath);
+ if (strcmp(pathbuf, realpath) == 0)
+ {
+ return 1;
+ }
+ }
+
+ memcpy(&node, node + nextoff, sizeof(node));
+ }
+
+ return 0;
+}
+