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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

tar file not being recognized #113

Open
marcosnils opened this issue Jun 21, 2022 · 1 comment
Open

tar file not being recognized #113

marcosnils opened this issue Jun 21, 2022 · 1 comment

Comments

@marcosnils
Copy link

marcosnils commented Jun 21, 2022

馃憢 filetype happy user here! Today someone opened an issue in my bin project (marcosnils/bin#140) which led me here.

Filetype is not being able to detect the tar archive inside this gzipped file here https://github.com/sass/dart-sass/releases/download/1.52.3/dart-sass-1.52.3-linux-x64.tar.gz. However, tar -xf works and running file <dart-sass-1.52.3-linux-x64.tar> correctly detects the filetype.

Clearly seems like the file MIME headers are not being properly set. Still.. it's interesting how file still detects it as a tar archive even if the extension is removed.

file -i pepe 
pepe: application/x-tar; charset=binary

Any pointers here?

@marcosnils
Copy link
Author

I see it's coming from here: https://sources.debian.org/src/file/1%3A5.39-3/src/funcs.c/#L296

Seems like file still tries to parse the file regardless if the MIME headers are found or not... I think I'll change bin to do a similar approach instead of just relying on MIME headers.

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

No branches or pull requests

1 participant