diff options
Diffstat (limited to 'tools/file_packager.py')
-rw-r--r-- | tools/file_packager.py | 7 |
1 files changed, 3 insertions, 4 deletions
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; |