improve error message

This commit is contained in:
Max Ogden 2015-05-14 17:02:06 -07:00
parent 5fe70a962c
commit fb3f4fa73f

View file

@ -213,7 +213,7 @@ exports.decode = function(buf) {
if (c === 8*32) return null if (c === 8*32) return null
//valid checksum //valid checksum
if (c !== decodeOct(buf, 148)) throw new Error('invalid header') if (c !== decodeOct(buf, 148)) throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?")
return { return {
name: name, name: name,