aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
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);
}