Skip to content

Commit 237bb7f

Browse files
committed
fix accent filename
1 parent 20c9cb8 commit 237bb7f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: adm-zip.js

+1
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ module.exports = function (/*String*/input) {
336336
i += 1;
337337
if (i < items.length) {
338338
var p = items[i].split("\\").join("/").replace(new RegExp(localPath.replace(/(\(|\))/g, '\\$1'), 'i'), ""); //windows fix
339+
p = p.normalize('NFD').replace(/[\u0300-\u036f]/g, '').replace(/[^\x20-\x7E]/g, '') // accent fix
339340
if (filter(p)) {
340341
if (p.charAt(p.length - 1) !== "/") {
341342
fs.readFile(items[i], function (err, data) {

0 commit comments

Comments
 (0)