-
-
Notifications
You must be signed in to change notification settings - Fork 387
Closed
Labels
Description
Description
The current tar file detection does not detect every tar file archive.
Steps to reproduce:
Download https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.7.12.tar.gz
gunzip linux-6.7.12.tar.gz
import { fileTypeFromFile } from 'file-type'
const result = await fileTypeFromFile("linux-6.7.12.tar");
console.log(JSON.stringify(result));
Outputs
undefined
This issue seems to be related to some pax tar archives, where the first, and only the (few) first 512 tar blocks(s), do not seem to have a valid checksum set.
Existing Issue Check
- I have searched the existing issues and could not find any related to my problem.
ESM (ECMAScript Module) Requirement Acknowledgment
- My project is an ESM project and my
package.json
contains the following entry:"type": "module"
.
File-Type Scope Acknowledgment
- I understand that file-type detects binary file types and not text or other formats.
Related: