void add_avoided_name (char const *name);
bool is_avoided_name (char const *name);
-bool is_individual_file (char const *name);
bool contains_dot_dot (char const *name);
put in the archive.
This check is omitted if incremental_option is set *and* the
- requested file is not explicitely listed in the command line. */
+ requested file is not explicitly listed in the command line. */
- if (!(incremental_option && !is_individual_file (p))
+ if (! (incremental_option && ! top_level)
&& !S_ISDIR (st->stat.st_mode)
&& OLDER_TAR_STAT_TIME (*st, m)
&& (!after_date_option || OLDER_TAR_STAT_TIME (*st, c)))
{
struct directory *directory;
struct stat *stat_data = &st->stat;
- dev_t device = st->parent ? st->parent->stat.st_dev : 0;
bool nfs = NFS_FILE_STAT (*stat_data);
if ((directory = find_directory (name_buffer)) != NULL)
}
}
- /* If the directory is on another device and --one-file-system was given,
- omit it... */
- if (one_file_system_option && device != stat_data->st_dev
- /* ... except if it was explicitely given in the command line */
- && !is_individual_file (name_buffer))
+ if (one_file_system_option && st->parent
+ && stat_data->st_dev != st->parent->stat.st_dev)
/* FIXME:
WARNOPT (WARN_XDEV,
(0, 0,
static uid_t cached_no_such_uid;
static gid_t cached_no_such_gid;
-static void register_individual_file (char const *name);
-
/* Given UID, find the corresponding UNAME. */
void
uid_to_uname (uid_t uid, char **uname)
{
if (unquote_option)
unquote_string (name_buffer);
- if (incremental_option)
- register_individual_file (name_buffer);
entry.type = ep->type;
entry.v.name = name_buffer;
return &entry;
{
return excluded_file_name (excluded, name + FILE_SYSTEM_PREFIX_LEN (name));
}
-\f
-static Hash_table *individual_file_table;
-
-static void
-register_individual_file (char const *name)
-{
- struct stat st;
-
- if (deref_stat (name, &st) != 0)
- return; /* Will be complained about later */
- if (S_ISDIR (st.st_mode))
- return;
-
- hash_string_insert (&individual_file_table, name);
-}
-
-bool
-is_individual_file (char const *name)
-{
- return hash_string_lookup (individual_file_table, name);
-}
-
\f
/* Return the size of the prefix of FILE_NAME that is removed after