Hi,

After upgrading to GNU tar 1.31, I am seeing bad behaviour trying to extract archives containing ./ entries with the -U option. This is easily reproducible:

  $ tar cf - --no-recursion . | tar xUf -
  Aborted

The abort() in src/extract.c's maybe_recoverable(), marked with a comment as unreachable, is in fact reachable in this case.

Either giving an error on the failure to remove ./ (and continuing extraction of the remaining files in the archive) or silently accepting the ./ entry would work. GNU tar 1.30 silently accepted it.

Background: I'm using a modified version of Slackware's pkgtools to manage the software on my system. Its packages are tar archives containing ./ entries as part of the spec, and it extracts them using -U, ignoring errors, to handle upgrades better, especially in the case where an older version of the package provided a symlink where the newer provides a directory.

Cheers,
Harald van Dijk

Reply via email to