xtractr
xtractr copied to clipboard
Xtractr should use file content to determine archive type
Hello,
I had an issue with unpackerr due to one of the *Arrs where an archive was mislabelled as RAR, but it was in fact a 7z archive. This is easily identified using the file command: file actually_7z.rar
. Archives generally have magic numbers to identify their type more reliably, I think this is a less brittle method.
https://github.com/golift/xtractr/blob/a1f733508a3242d9242cd5d16cd5ccec222cbe2f/files.go#L274