- /* 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;
- }
-
+ if (! top_level && errno == ENOENT)
+ WARN ((0, 0, _("File %s removed before we read it"),
+ quote (p)));
+ else if (ignore_failed_read_option)
+ open_warn (p);
+ else
+ open_error (p);