Skip to content

Commit

Permalink
Fixed small bug related to filename case in GWT version of ZIP import.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanceewing committed Feb 16, 2024
1 parent b802ae1 commit c821795
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,13 @@ public void onFileResultsReady(GwtOpenFileResult[] openFileResultArray) {
String fileName = files.get(i);
if (isGameFile(fileName)) {
JSFile gameFile = jsZip.getFile(fileName);
gameFilesMap.put(fileName.toLowerCase(), gameFile.asUint8Array().toByteArray());
String fileNameLowerCase = fileName.toLowerCase();
gameFilesMap.put(fileNameLowerCase, gameFile.asUint8Array().toByteArray());

if (fileName.matches("^[a-z0-9]*vol.[0-9]+$")) {
if (fileNameLowerCase.matches("^[a-z0-9]*vol.[0-9]+$")) {
hasVolFile = true;
}
if (fileName.endsWith("dir")) {
if (fileNameLowerCase.endsWith("dir")) {
hasDirFile = true;
}
}
Expand Down

0 comments on commit c821795

Please sign in to comment.