Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify test for special files. #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Vadiml1024
Copy link

For some reason the test S_ISREG fails on regular files.
For example:
stat /usr/lib/cups/backend/snmp
File: /usr/lib/cups/backend/snmp
Size: 35120 Blocks: 72 IO Block: 4096 regular file
Device: fd01h/64769d Inode: 656159 Links: 2
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2022-06-28 10:10:02.242856283 +0000
Modify: 2020-04-24 14:37:14.000000000 +0000
Change: 2021-12-15 23:29:04.213415906 +0000
Birth: -

If the above file is stored in tar.gz the S_ISREG(archive_entry_mode(e)) returns FALSE!

@google-cla
Copy link

google-cla bot commented Jun 29, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@vassilit
Copy link
Contributor

vassilit commented Dec 2, 2022

Could you provide a sample .tar.gz containing such a file ?

@mattmart3
Copy link

mattmart3 commented Jul 31, 2023

I can reproduce it with a tar.gz archive containing hard links.

The issue is likely related to how libarchive handles hard links.

Details in issue #18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants