aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-10-04 18:13:17 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-10-04 18:13:17 -0700
commit2be2720852b990937bfbe71a8f6b65b2f20cb33d (patch)
tree77dc7a0b7decbb31a2b246a3e0c252210061826b /src/library.js
parent2ac61df97125086a0ecb6f00fdd08cf8d93f02c2 (diff)
emscripten_async_prepare
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js
index 6662e9b7..1bb58833 100644
--- a/src/library.js
+++ b/src/library.js
@@ -304,12 +304,14 @@ LibraryManager.library = {
// You can also call this with a typed array instead of a url. It will then
// do preloading for the Image/Audio part, as if the typed array were the
// result of an XHR that you did manually.
- createPreloadedFile: function(parent, name, url, canRead, canWrite, onload, onerror) {
+ createPreloadedFile: function(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile) {
Browser.ensureObjects();
var fullname = FS.joinPath([parent, name], true);
function processData(byteArray) {
function finish(byteArray) {
- FS.createDataFile(parent, name, byteArray, canRead, canWrite);
+ if (!dontCreateFile) {
+ FS.createDataFile(parent, name, byteArray, canRead, canWrite);
+ }
if (onload) onload();
removeRunDependency('cp ' + fullname);
}