diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2010-10-15 22:26:14 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2010-10-15 22:26:43 -0700 |
commit | 9447e799ab5faa6e8be43de4000e1061e0879242 (patch) | |
tree | 573841c910e94608bd14c1aa79a1f78ba8d9454a /AUTHORS | |
parent | 502abd93bd8bfba15677aceb221c4530d257bbab (diff) | |
download | tar-9447e799ab5faa6e8be43de4000e1061e0879242.tar.gz |
tar: use more-accurate diagnostic when intermediate mkdir fails
Without this change, if tar tried to extract a file A/B/C, noticed
that A/B didn't exist, attempted to mkdir A/B, and the mkdir
failed, it did not diagnose the mkdir failure, but simply reported
the failure to open A/B/C. This sometimes led to confusion
because it wasn't clear what tar was trying to do, in particular
that tar tried to mkdir A/B. With this patch, tar issues two
diagnostics in this case: one for A/B and the other for A/B/C.
Problem reported by Hauke Laging in
<http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00020.html>.
* gnulib.modules: Remove faccessat.
* src/extract.c (make_directories): New arg INTERDIR_MADE.
Diagnose mkdir failure. Return 0 on success, nonzero on failure,
as opposed to nonzero iff some directory was created. All callers
changed. Simplify the code when mkdir fails, by checking whether
the desired file exists unless errno==EEXIST: this is more robust.
* tests/extrac15.at: New test, to check this.
* tests/Makefile.am (TESTSUITE_AT): Add it.
* tests/testsuite.at: Include it.
Diffstat (limited to 'AUTHORS')
0 files changed, 0 insertions, 0 deletions