aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS2
-rw-r--r--tools/file_packager.py7
2 files changed, 5 insertions, 4 deletions
diff --git a/AUTHORS b/AUTHORS
index fc947687..9e01eb42 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -121,3 +121,5 @@ a license to everyone to use it as detailed in LICENSE.)
* Sindre Sorhus <sindresorhus@gmail.com>
* James S Urquhart <jamesu@gmail.com>
* Boris Gjenero <boris.gjenero@gmail.com>
+* jonas echterhoff <jonas@unity3d.com>
+
diff --git a/tools/file_packager.py b/tools/file_packager.py
index 2c70767a..aa70ac6a 100644
--- a/tools/file_packager.py
+++ b/tools/file_packager.py
@@ -481,7 +481,7 @@ if has_preloaded:
}
var PACKAGE_NAME = '%s';
var REMOTE_PACKAGE_NAME = (Module['filePackagePrefixURL'] || '') + '%s';
- var REMOTE_PACKAGE_SIZE = '%s';
+ var REMOTE_PACKAGE_SIZE = %d;
var PACKAGE_UUID = '%s';
''' % (data_target, remote_package_name, remote_package_size, package_uuid)
@@ -584,15 +584,14 @@ if has_preloaded:
xhr.onprogress = function(event) {
var url = packageName;
var size = packageSize;
- if (event.total)
- size = event.total;
+ if (event.total) size = event.total;
if (event.loaded) {
if (!xhr.addedTotal) {
xhr.addedTotal = true;
if (!Module.dataFileDownloads) Module.dataFileDownloads = {};
Module.dataFileDownloads[url] = {
loaded: event.loaded,
- total: packageSize
+ total: size
};
} else {
Module.dataFileDownloads[url].loaded = event.loaded;