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

@@ -39,11 +39,10 @@ tar -cf a.tar . -C dir
./A.b
./B.a
],
[tar: ./a.tar: file is the archive; not dumped
[tar: ./a.tar: archive cannot contain itself; not dumped
tar: The following options were used after any non-optional arguments in archive create or update mode. These options are positional and affect only arguments that follow them. Please, rearrange them properly.
tar: -C 'dir' has no effect
tar: Exiting with failure status due to previous errors
])
AT_CLEANUP