Pebble: skip .js file if too large instead of breaking installation

(Hotfix)
This commit is contained in:
Andreas Shimokawa 2016-03-03 17:46:58 +01:00
parent aba21d3ab7
commit f616e4f571
1 changed files with 4 additions and 2 deletions

View File

@ -216,8 +216,10 @@ public class PBWReader {
} else if (fileName.equals("pebble-js-app.js")) { } else if (fileName.equals("pebble-js-app.js")) {
LOG.info("Found JS file: app supports configuration."); LOG.info("Found JS file: app supports configuration.");
long bytes = ze.getSize(); long bytes = ze.getSize();
if (bytes > 65536) // that should be too much if (bytes > 65536) {
break; LOG.info("size exceeding 64k, skipping");
continue;
}
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
while ((count = zis.read(buffer)) != -1) { while ((count = zis.read(buffer)) != -1) {