On Sat, Sep 21, 2013 at 01:29:25 -0400, Nathan Stratton Treadway wrote: > So I wonder if the "proper" fix at this point would be to switch > everything to using the "virtual chdir" approach? > > (This seems a little strange, since it means changing the code path for > --create, which is the branch that is currently working correctly -- but > otherwise I think queue_deferred_unlink()/normalize_filename() would > need to include support for both "actual" and "virtual" chdirs styles, > which might be more painful in the long run.)
I realized that in addition to --append, the same problem happens when using --create in incremental mode: $ mkdir foo $ echo bar > bar $ echo foo/bar > foo/bar $ rm subdir/foo $ find . ./foo ./foo/bar ./bar $ tar -cvf foo.tar --listed-incremental=foo.snar0 --remove-files -C foo bar bar $ find . ./foo ./foo/bar ./foo.snar0 ./foo.tar $ tar -xOf foo.tar bar foo/bar (So, once again the correct file is included in the archive, but the wrong one gets deleted.) This results from the fact that in incremental mode create_archive() uses "name_from_list ()" instead of "name_next (1)", and thus the queue_deferred_unlink() calls run into the same problem as in the --append case. Nathan ---------------------------------------------------------------------------- Nathan Stratton Treadway - natha...@ontko.com - Mid-Atlantic region Ray Ontko & Co. - Software consulting services - http://www.ontko.com/ GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239 Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239