You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by gt...@apache.org on 2013/01/02 19:08:26 UTC

[2/2] js commit: Fixed lint error in BB10 file module and got rid of BlobBuilder use

Updated Branches:
  refs/heads/master 2226b097a -> 4082ee0ba


Fixed lint error in BB10 file module and got rid of BlobBuilder use


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/4082ee0b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/4082ee0b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/4082ee0b

Branch: refs/heads/master
Commit: 4082ee0ba3a8902cba7bd087d0584bb7534e694b
Parents: df5c78d
Author: Gord Tanner <gt...@gmail.com>
Authored: Wed Jan 2 13:07:32 2013 -0500
Committer: Gord Tanner <gt...@gmail.com>
Committed: Wed Jan 2 13:07:32 2013 -0500

----------------------------------------------------------------------
 lib/blackberry/plugin/qnx/file.js |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4082ee0b/lib/blackberry/plugin/qnx/file.js
----------------------------------------------------------------------
diff --git a/lib/blackberry/plugin/qnx/file.js b/lib/blackberry/plugin/qnx/file.js
index 6317857..8bf9b86 100644
--- a/lib/blackberry/plugin/qnx/file.js
+++ b/lib/blackberry/plugin/qnx/file.js
@@ -20,7 +20,8 @@
 */
 
 /*global WebKitBlobBuilder:false */
-var FileError = require('cordova/plugin/FileError'),
+var cordova = require('cordova'),
+    FileError = require('cordova/plugin/FileError'),
     DirectoryEntry = require('cordova/plugin/DirectoryEntry'),
     FileEntry = require('cordova/plugin/FileEntry'),
     File = require('cordova/plugin/File'),
@@ -176,7 +177,7 @@ module.exports = {
                 entry.remove(
                     function (success) {
                         if (successCallback) {
-                            successCallback(success)
+                            successCallback(success);
                         }
                     },
                     function(error) {
@@ -376,14 +377,11 @@ module.exports = {
             };
 
             entry.createWriter(function(writer) {
-                var blob = new WebKitBlobBuilder();
-                blob.append(text);
-
                 writer.onwriteend = onWriteEnd;
                 writer.onerror = onError;
 
                 writer.seek(position);
-                writer.write(blob.getBlob('text/plain'));
+                writer.write(new Blob([text], {type: "text/plain"}));
             }, function(error) {
                 errorCallback(error.code);
             });