You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% mkdir dir2
% ln -s dir2 dir
% touch dir/file
% ln dir/file dir/file2
% tar cf dir.tar dir/file dir/file2
% rm dir/*
% tar xf dir.tar -P
dir/file2: Can't create 'dir/file2'
tar: Error exit delayed from previous errors.
tijl@kalimero:~/tmp/test% ls -l dir/
total 0
-rw-r--r-- 1 tijl wheel 0 6 Nov 20:05 file
With -P extraction through a symlink (dir->dir2) should work, but fails for hardlinks.
The patch fixes this. In archive_write_disk_posix.c the function create_filesystem_object() calls check_symlinks_fsobj() in the case of hardlinks, but not in the case of symlinks or regular files. The patch removes this call. check_symlinks_fsobj() is still called elsewhere in the same file and the 'tar xf' command above without -P still fails on both archive entries.
Issue created from FreeBSD bug 213255.
Tijl Coosemans writes:
Proposed patch
The text was updated successfully, but these errors were encountered: