archive_entry_nlinks always returns 0

14 views
Skip to first unread message

Anna Blendermann

unread,
May 15, 2019, 12:57:31 PM5/15/19
to libarchive-discuss
Hey ya'll,

I'm trying to use libarchive's archive_entry_nlinks function to get the number of hardlinks associated with a file, but it keeps returning 0. I've been debugging this issue for hours and began suspecting it was a bug in the libarchive api. Here's a small testApp that uses libarchive example code with a tar archive containing text file readme.txt and hardlink file hardlink.txt -> readme.txt.

Has anyone seen this issue or know of another way to detect hardlinks? Thanks.


libarchive code.PNG

nohardlinks.PNG

Best regards,

Anna


Reply all
Reply to author
Forward
0 new messages