8000 压缩文件夹报错 · Issue #1 · zwStar/amd-zip · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

压缩文件夹报错 #1

New issue

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

Open
183181731 opened this issue Nov 23, 2020 · 1 comment
Open

压缩文件夹报错 #1

183181731 opened this issue Nov 23, 2020 · 1 comment

Comments

@183181731
Copy link

var zip = new AdmZip();
zip.addLocalFolder(dic);
zip.writeZip(zip);

压缩文件夹时报错,提示
TypeError: entry.rawEntryName.copy is not a function
at d:\WebstormProjects\testgitnode\node_modules@zwg\adm-zip\zipFile.js:273:24
at Array.forEach ()
at Object.compressToBuffer (d:\WebstormProjects\testgitnode\node_modules@zwg\adm-zip\zipFile.js:264:14)
at Object.writeZip (d:\WebstormProjects\testgitnode\node_modules@zwg\adm-zip\adm-zip.js:623:23)
at Object. (d:\WebstormProjects\testgitnode\ttt.js:79:5)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)

@183181731
Copy link
Author

这个问题更改了zipEntry.js中的
get rawEntryName()方法的返回
return Buffer(iconv.decode(_entryName, encode)); 解决了
不过中文的文件或者文件夹打包成zip,依然会乱码。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0