safegetzipfile fix

This commit is contained in:
reviewher 2021-10-12 04:55:29 -04:00 committed by GitHub
parent 3af23c31dd
commit cb61a67d17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,7 +30,7 @@ function safegetzipfile(zip, file/*:string*/) {
var f = file.toLowerCase().replace(/[\/]/g, '\\'), g = f.replace(/\\/g,'\/');
for(var i=0; i<k.length; ++i) {
var n = k[i].replace(/^Root Entry[\/]/,"").toLowerCase();
if(f == n || g == n) return zip.FileIndex[i];
if(f == n || g == n) return zip.files ? zip.files[k[i]] : zip.FileIndex[i];
}
return null;
}