X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fincremen.c;h=fcfdaa949321cba4cb99ad6fe4cd3cf44690fb62;hb=7cb84c25ee51f443c69443e217efe194d12678ea;hp=aaeda5877ca95fd6af9faa29e6a3dccbdd550cc8;hpb=2b1bffbad66faab91c3b080b63788d910f68632d;p=chaz%2Ftar diff --git a/src/incremen.c b/src/incremen.c index aaeda58..fcfdaa9 100644 --- a/src/incremen.c +++ b/src/incremen.c @@ -413,7 +413,11 @@ update_parent_directory (const char *name) { struct stat st; if (deref_stat (dereference_option, p, &st) != 0) - stat_diag (name); + { + if (errno != ENOENT) + stat_diag (directory->name); + /* else: should have been already reported */ + } else directory->mtime = get_stat_mtime (&st); } @@ -549,6 +553,12 @@ procdir (const char *name_buffer, struct stat *stat_data, 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)) + /* FIXME: + WARNOPT (WARN_XDEV, + (0, 0, + _("%s: directory is on a different filesystem; not dumped"), + quotearg_colon (directory->name))); + */ directory->children = NO_CHILDREN; else if (flag & PD_FORCE_CHILDREN) { @@ -699,10 +709,7 @@ scan_directory (char *dir, dev_t device, bool cmdline) if (deref_stat (dereference_option, name_buffer, &stat_data)) { - stat_diag (name_buffer); - /* FIXME: used to be - children = CHANGED_CHILDREN; - but changed to: */ + dir_removed_diag (name_buffer, cmdline, stat_diag); free (name_buffer); free (dirp); return NULL; @@ -750,7 +757,7 @@ scan_directory (char *dir, dev_t device, bool cmdline) { if (deref_stat (dereference_option, name_buffer, &stat_data)) { - stat_diag (name_buffer); + file_removed_diag (name_buffer, false, stat_diag); *entry = 'N'; continue; } @@ -1314,6 +1321,13 @@ read_directory_file (void) return; } + /* Consume the first name from the name list and reset the + list afterwards. This is done to change to the new + directory, if the first name is a chdir request (-C dir), + which is necessary to recreate absolute file names. */ + name_from_list (); + blank_name_list (); + if (0 < getline (&buf, &bufsize, listed_incremental_stream)) { char *ebuf;