]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Windows symlinks: new functions and extended tar header
authorMartin Matuska <martin@matuska.org>
Sun, 14 Apr 2019 23:50:29 +0000 (01:50 +0200)
committerMartin Matuska <martin@matuska.org>
Mon, 15 Apr 2019 21:36:06 +0000 (23:36 +0200)
commitb0ed582e68fe6e474d321934d29b0f229c0feb9f
tree04d67b7fa3d5631736f850a1aead1dbe88e4f30a
parent19bd077987ff26a4cb108edde5eaf970837aa1f0
Windows symlinks: new functions and extended tar header

New functions:
archive_entry_symlink_type()
archive_entry_set_symlink_type()

Suppoted value constants:
AE_SYMLINK_TYPE_UNDEFINED
AE_SYMLINK_TYPE_FILE
AE_SYMLINK_TYPE_DIRECTORY

New extended tar header:
LIBARCHIVE.symlinktype

The function archive_entry_symlink_type() retrieves and the function
archive_entry_set_symlink_type() sets the symbolic link type of an archive
entry. The information about the symbolic link type is required to properly
restore symbolic links on Microsoft Windows. If the symlink type is set
to AE_SYMLINK_TYPE_FILE or AE_SYMLINK_TYPE_DIRECTORY and a tar archive
is written, an extended tar header LIBARCHIVE.symlinktype is stored with
the value "file" or "dir". When reading symbolic links on Windows, the
link type is automatically stored in the archive_entry structure.

On unix systems, the symlink type has no effect when reading or writing
symbolic links.
12 files changed:
Makefile.am
libarchive/CMakeLists.txt
libarchive/archive_entry.c
libarchive/archive_entry.h
libarchive/archive_entry_misc.3 [new file with mode: 0644]
libarchive/archive_entry_private.h
libarchive/archive_read_disk_windows.c
libarchive/archive_read_support_format_tar.c
libarchive/archive_write_disk_windows.c
libarchive/archive_write_set_format_pax.c
libarchive/test/test_write_disk_symlink.c
test_utils/test_main.c