summaryrefslogtreecommitdiff
path: root/src/incremen.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2010-11-22 22:50:58 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2010-11-22 22:51:29 -0800
commit065cf0958c39600f2062cbeeb5b76929d03c207b (patch)
tree8db5de58bac9fdaca4affcc8d89a5ea951f6a47d /src/incremen.c
parent2a55b4b0373eef2e879408f9df6638bb03e16170 (diff)
downloadtar-065cf0958c39600f2062cbeeb5b76929d03c207b.tar.gz
* src/names.c: tar: fix bug with --one-file-system --listed-incremental
Problem (and idea for fix) reported by Martin Weigel <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00071.html>. * src/common.h (is_individual_file): Remove decl. * src/create.c (dump_file0): Replace "is_individual_file (p)" with "top_level". * src/incremen.c (procdir): Replace "!is_individual_file (name_buffer)" with "st->parent". Fix bug with --one-file-system and --listed-incremental. * src/names.c (individual_file_table, register_individual_file): (is_individual_file): Remove. All uses removed.
Diffstat (limited to 'src/incremen.c')
-rw-r--r--src/incremen.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/incremen.c b/src/incremen.c
index 628ff296..2b33c5d1 100644
--- a/src/incremen.c
+++ b/src/incremen.c
@@ -426,7 +426,6 @@ procdir (const char *name_buffer, struct tar_stat_info *st,
{
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)
@@ -540,11 +539,8 @@ procdir (const char *name_buffer, struct tar_stat_info *st,
}
}
- /* 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,