We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using extract-zip 2.0.1., node 16.19, and CentOS 7, there is an error when extracting a zip file using the "overwrite: true" option.
[Error: EEXIST: file already exists, symlink 'catalog_libraries.json' -> '/home/trudolph/exp/output/catalog/catalog_builds.json'] { errno: -17, code: 'EEXIST', syscall: 'symlink', path: 'catalog_libraries.json', dest: '/home/trudolph/exp/output/catalog/catalog_builds.json' }
It seems to me that it should overwrite the symlinks as well as the regular files.
Using information found in the source code and in #20, I coded the following to make it work.
await extract('catalog2.zip', { dir: realDest, overwrite: true, onEntry: (entry, zip) => { // handle link overwrite const mode = (entry.externalFileAttributes >> 16) & 0xFFFF; // convert to fs stat mode const IFMT = 61440; const IFLNK = 40960; const symlink = (mode & IFMT) === IFLNK; if (sysmlink) { fs.unlinkSync(dir + '/' + entry.fileName); } console.log(entry); } });
This works adequately for now, but I am hoping that there will be a fix in extract-zip.
Thank you
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using extract-zip 2.0.1., node 16.19, and CentOS 7, there is an error when extracting a zip file using the "overwrite: true" option.
It seems to me that it should overwrite the symlinks as well as the regular files.
Using information found in the source code and in #20, I coded the following to make it work.
This works adequately for now, but I am hoping that there will be a fix in extract-zip.
Thank you
The text was updated successfully, but these errors were encountered: