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
修改 lib/zip/stream.js 文件中添加 _addDirEntry 方法如下,添加一下代码,此方法为临时修复,希望作者可以给出相应的修复方案,更新npm包 此方案只修复zip打包方式,其他打包请参考
//需要头部导入两个包 const fs = require('fs'); const utils = require('../utils'); _addDirEntry(entry, opts) { //先创建文件夹 this._zipfile.addEmptyDirectory(opts.relativePath || path.basename(entry), opts); fs.readdir(entry, (err, files) => { if (err) return this.emit('error', err); const relativePath = opts.relativePath || ''; files.forEach(fileOrDir => { const newOpts = utils.clone(opts); if (opts.ignoreBase) { newOpts.relativePath = path.join(relativePath, fileOrDir); } else { newOpts.relativePath = path.join(relativePath, path.basename(entry), fileOrDir); } newOpts.ignoreBase = true; this.addEntry(path.join(entry, fileOrDir), newOpts); }); this._onEntryFinish(); }); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
修改 lib/zip/stream.js 文件中添加 _addDirEntry 方法如下,添加一下代码,此方法为临时修复,希望作者可以给出相应的修复方案,更新npm包
此方案只修复zip打包方式,其他打包请参考
The text was updated successfully, but these errors were encountered: