Apply letter case issue fix to the source code

This commit is contained in:
Georgy Chikhladze 2016-09-10 12:55:46 +03:00
parent 796fbb515a
commit d3f63434a0

@ -15,8 +15,14 @@ function getdata(data) {
function safegetzipfile(zip, file) {
var f = file; if(zip.files[f]) return zip.files[f];
f = file.toLowerCase(); if(zip.files[f]) return zip.files[f];
f = f.replace(/\//g,'\\'); if(zip.files[f]) return zip.files[f];
var lowerCaseFiles = {};
for (var key in zip.files) {
lowerCaseFiles[key.toLowerCase()] = zip.files[key];
}
f = file.toLowerCase(); if(lowerCaseFiles[f]) return lowerCaseFiles[f];
f = f.replace(/\//g,'\\'); if(lowerCaseFiles[f]) return lowerCaseFiles[f];
return null;
}