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.