1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

archive_entry_set_link is supposed to update whichever link field

(symlink or hardlink) is already set.  Instead, it was always setting
the hardlink field.  In particular, this caused GNU tar format long
symlinks to be interpreted as hardlinks.

Thanks to: Brooks Davis
MFC after: 7 days
This commit is contained in:
Tim Kientzle 2005-05-08 19:10:41 +00:00
parent 769f92857b
commit 0e35a97bf9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146012

View File

@ -575,6 +575,7 @@ archive_entry_set_link(struct archive_entry *entry, const char *target)
if (entry->ae_symlink.aes_mbs != NULL ||
entry->ae_symlink.aes_wcs != NULL)
aes_set_mbs(&entry->ae_symlink, target);
else
aes_set_mbs(&entry->ae_hardlink, target);
}