aboutsummaryrefslogtreecommitdiff
path: root/js/io
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-08-07 13:27:19 -0700
committerNivesh Rajbhandari2012-08-07 13:27:19 -0700
commitda71ec8bf450438a4dc904cb348e548d01dfcb3f (patch)
tree36bae4f77a61c2c6690566c79d07f5b6bc2c3936 /js/io
parent923e760bf4a16baa82e81da6d38e671620664e8f (diff)
parent91c440a04f0108d05e663d1696027ca5601b25bc (diff)
downloadninja-da71ec8bf450438a4dc904cb348e548d01dfcb3f.tar.gz
Merge branch 'refs/heads/ninja-mqg734-master' into LineInCanvas
Diffstat (limited to 'js/io')
-rw-r--r--js/io/system/chromeapi.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/io/system/chromeapi.js b/js/io/system/chromeapi.js
index e46894d3..e33406ee 100644
--- a/js/io/system/chromeapi.js
+++ b/js/io/system/chromeapi.js
@@ -96,7 +96,7 @@ exports.ChromeApi = Montage.create(Object.prototype, {
96 // 96 //
97 f.createWriter(function(writer) { 97 f.createWriter(function(writer) {
98 // 98 //
99 var mime, blob = new window.WebKitBlobBuilder, type = filePath.split('.'); 99 var mime, blob, type = filePath.split('.');
100 type = type[type.length-1]; 100 type = type[type.length-1];
101 switch (type) { 101 switch (type) {
102 case 'bmp': 102 case 'bmp':
@@ -137,8 +137,9 @@ exports.ChromeApi = Montage.create(Object.prototype, {
137 break; 137 break;
138 } 138 }
139 // 139 //
140 blob.append(content); 140 blob = new Blob([content], {type: type});
141 writer.write(blob.getBlob(mime)); 141 //
142 writer.write(blob);
142 // 143 //
143 if (callback) callback(true); 144 if (callback) callback(true);
144 }, function (e) {if (callback) callback(false)}); 145 }, function (e) {if (callback) callback(false)});