- WARN ((0, errno, _("Cannot add file %s"), p));
- if (!ignore_failed_read_option)
- exit_status = TAREXIT_FAILURE;
+ /* Do not diagnose a file that the parent directory
+ said should be there, but is absent. It was
+ probably removed between then and now. */
+ if (top_level || errno != ENOENT)
+ {
+ WARN ((0, errno, _("Cannot add file %s"), p));
+ if (! ignore_failed_read_option)
+ exit_status = TAREXIT_FAILURE;
+ }
+