Hi,
When creating a ZIP file with the forceZip64 option set to true and applying a password, the unzip process prompts for the password for each file entry when extracting. For example, if there are four files within the ZIP, the user is asked to enter the password four times.
The expected behavior is to require the password input only once during the unzip process, regardless of the number of file entries. It seems that my implementation might be incorrect.
// determine forcing ZIP64
const archivePath = "./archiveFolder"
let forceZip64 = false;
let allFiles = fs.readdirSync(archivePath);
for (let file of allFiles) {
let filePath = path.join(archivePath, file);
let stat = fs.statSync(filePath);
const sizeThreshold = 4294967295; // 3.999GB
if (stat.isFile() && stat.size >= sizeThreshold) {
forceZip64 = true;
}
}
const output = fs.createWriteStream("./res");
archive.pipe(output);
let allFiles = fs.readdirSync(archivePath);
// archive zip
for (let file of allFiles) {
let filePath = path.join(archivePath, file);
let stat = fs.statSync(filePath);
if (stat.isFile()) {
archive.file(filePath, { name: file });
}
}
archive.finalize();
Hi, When creating a ZIP file with the forceZip64 option set to true and applying a password, the unzip process prompts for the password for each file entry when extracting. For example, if there are four files within the ZIP, the user is asked to enter the password four times.
The expected behavior is to require the password input only once during the unzip process, regardless of the number of file entries. It seems that my implementation might be incorrect.
Thank you in advance.