Skip to content

About the modification

Catboy edited this page Jul 27, 2025 · 1 revision

I've added --copy-links option for link-to-file conversion during extraction to the GNU tar utility.

Based on GNU tar 1.35 (https://ftp.gnu.org/gnu/tar/tar-1.35.tar.xz)

This adds support for converting symbolic and hard links to regular file copies during tar extraction, useful for platforms with limited link support (such as Windows).

Key changes:

  • Add --copy-links command line option and copy_links_option flag
  • Implement deferred link resolution system using struct deferred_link
  • Modify extract_link() and extract_symlink() to defer processing when --copy-links is enabled
  • Add resolve_deferred_links() to copy target files to link locations after all files are extracted

Clone this wiki locally