aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjonas echterhoff <jonas@unity3d.com>2014-02-12 10:01:05 +0100
committerAlon Zakai <alonzakai@gmail.com>2014-02-12 11:07:04 -0800
commit61f0d198560a3ebcc074b29f7a01aa6ce63f0afa (patch)
treed707eea98b8e52e6ceebb7dfd73c77aa3db9af33
parentaf5e9738ff7ac11ca0bc0c380a531965fe61df3c (diff)
Fixes according to pull request feedback.
-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;