tar: revamp "file is the archive" diagnostic

* src/create.c (dump_file0): For clarity, change diagnostic
wording from "file is the archive; not dumped" to "archive cannot
contain itself; not dumped".  All test cases and documentation changed.
This commit is contained in:
Paul Eggert
2022-02-15 17:40:34 -08:00
parent 5c713540e3
commit eeda008a59
4 changed files with 6 additions and 9 deletions

View File

@@ -1723,7 +1723,7 @@ dump_file0 (struct tar_stat_info *st, char const *name, char const *p)
if (sys_file_is_archive (st))
{
WARNOPT (WARN_IGNORE_ARCHIVE,
(0, 0, _("%s: file is the archive; not dumped"),
(0, 0, _("%s: archive cannot contain itself; not dumped"),
quotearg_colon (p)));
return;
}