X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fmisc.c;h=a087263556804d251b3a1e0a901b44448c8de18f;hb=87240ee7c477ae4960cf81d3c38691ae93ceaee8;hp=116eb9673a615e7144b1e110ab5ff580e648435d;hpb=acd833fb9815a8fe1c2bb9b90203e008a62ee374;p=chaz%2Ftar diff --git a/src/misc.c b/src/misc.c index 116eb96..a087263 100644 --- a/src/misc.c +++ b/src/misc.c @@ -750,9 +750,12 @@ file_removed_diag (const char *name, bool top_level, void (*diagfn) (char const *name)) { if (!top_level && errno == ENOENT) - WARNOPT (WARN_FILE_REMOVED, - (0, 0, _("%s: File removed before we read it"), - quotearg_colon (name))); + { + WARNOPT (WARN_FILE_REMOVED, + (0, 0, _("%s: File removed before we read it"), + quotearg_colon (name))); + set_exit_status (TAREXIT_DIFFERS); + } else diagfn (name); } @@ -766,8 +769,7 @@ dir_removed_diag (const char *name, bool top_level, WARNOPT (WARN_FILE_REMOVED, (0, 0, _("%s: Directory removed before we read it"), quotearg_colon (name))); - if (exit_status == TAREXIT_SUCCESS) - exit_status = TAREXIT_DIFFERS; + set_exit_status (TAREXIT_DIFFERS); } else diagfn (name);