adm-zip icon indicating copy to clipboard operation
adm-zip copied to clipboard

The value of "offset" is out of range. It must be >= 0 and <= 30. Received 31

Open shanzemin opened this issue 1 year ago • 1 comments

const AdmZip = require('adm-zip')
const filepath = './test.zip'
const zip = new AdmZip(filepath)
// main.js need to exist
const entry = zip.getEntry('main.js')
if (entry) {
  zip.updateFile(entry, Buffer.from('123123123', 'utf8'))
  zip.writeZip(filepath)
}

filepath is a compressed package for macOS, the first execution is normal but an error is reported if the subsequent execution continues.

shanzemin avatar May 14 '24 02:05 shanzemin

zip file is a compressed package for mac system, code execution is in windows or linux system.

shanzemin avatar May 14 '24 02:05 shanzemin

This issue should be fixed in v0.5.14

5saviahv avatar Jun 04 '24 15:06 5saviahv