- if (fnmatch (cursor->name, path, FNM_LEADING_DIR) == 0)
- {
- cursor->found = 1; /* remember it matched */
- if (starting_file_option)
- {
- free (namelist);
- namelist = NULL;
- }
- if (cursor->change_dir && chdir (cursor->change_dir))
- FATAL_ERROR ((0, errno, _("Cannot change to directory %s"),
- cursor->change_dir));
-
- /* We got a match. */
- return 1;
- }
- continue;
- }
-
- /* Plain Old Strings. */
-
- if (cursor->length <= length
- /* archive length >= specified */
- && (path[cursor->length] == '\0'
- || path[cursor->length] == '/')
- /* full match on file/dirname */
- && strncmp (path, cursor->name, (size_t) cursor->length) == 0)
- /* name compare */
- {
- cursor->found = 1; /* remember it matched */
- if (starting_file_option)
- {
- free ((void *) namelist);
- namelist = 0;
- }
- if (cursor->change_dir && chdir (cursor->change_dir))
- FATAL_ERROR ((0, errno, _("Cannot change to directory %s"),
- cursor->change_dir));
-
- /* We got a match. */
- return 1;