golift/xtractr

Xtractr should use file content to determine archive type

lateef-k opened this issue · 0 comments

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.

if strings.HasSuffix(sName, ext.Extension) {