/* Various processing of names.
- Copyright 1988,92,94,96,97,98,99,2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1988, 1992, 1994, 1996, 1997, 1998, 1999, 2000, 2001 Free
+ Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
if (deref_stat (dereference_option, name->name, &statbuf) != 0)
{
- stat_error (name->name);
+ if (ignore_failed_read_option)
+ stat_warn (name->name);
+ else
+ stat_error (name->name);
continue;
}
if (S_ISDIR (statbuf.st_mode))
/* Return nonzero if file NAME is excluded. Exclude a name if its
prefix matches a pattern that contains slashes, or if one of its
components matches a pattern that contains no slashes. */
-int
+bool
excluded_name (char const *name)
{
- char const *p;
- name += FILESYSTEM_PREFIX_LEN (name);
-
- if (excluded_filename (excluded_with_slash, name,
- FNM_FILE_NAME | recursion_option))
- return 1;
-
- for (p = name; *p; p++)
- if (((p == name || ISSLASH (p[-1])) && !ISSLASH (p[0]))
- && excluded_filename (excluded_without_slash, p,
- FNM_FILE_NAME | FNM_LEADING_DIR))
- return 1;
-
- return 0;
+ return excluded_filename (excluded, name + FILESYSTEM_PREFIX_LEN (name));
}
\f
/* Names to avoid dumping. */