]> Dogcows Code - chaz/tar/commit
tar: fix bug with -C and delayed setting of metadata
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 26 Aug 2010 00:09:17 +0000 (17:09 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 26 Aug 2010 00:09:59 +0000 (17:09 -0700)
commitfce1c1c8cbb4a3df303ae01b33459197cb42c557
tree86fb72afd7dc3e0d8ceb68078691f7f175479481
parent372ac37d01a218e87ad6279c43a75c1b88c1d41f
tar: fix bug with -C and delayed setting of metadata

* src/common.h (chdir_current): New decl.
* src/extract.c (struct delayed_set_stat, struct delayed_link):
New member change_dir.
(delay_set_stat, create_placeholder_file): Set it.
(apply_nonancestor_delayed_set_stat, apply_delayed_links): Use it.
(extract_link): Check that the links are all relative to the same
directory.
(extract_archive): Restore the current directory after
apply_nonancestor_delayed_set_stat has possibly changed it.
* src/misc.c (chdir_current): New external var; this used to
be the private static variable 'previous' inside chdir_dir.
All uses changed.
* tests/Makefile.am (TESTSUITE_AT): New test extrac10.at.
* tests/extrac10.at: New file.
* tests/testsuite.at: Include it.
src/common.h
src/extract.c
src/misc.c
tests/Makefile.am
tests/extrac10.at [new file with mode: 0644]
tests/testsuite.at
This page took 0.026836 seconds and 4 git commands to generate.