You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mu...@apache.org on 2015/07/27 20:44:02 UTC

cordova-plugin-camera git commit: CB-9413 Close RandomAccessStream once copied

Repository: cordova-plugin-camera
Updated Branches:
  refs/heads/master eeb588058 -> 110b3b338


CB-9413 Close RandomAccessStream once copied


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/110b3b33
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/110b3b33
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/110b3b33

Branch: refs/heads/master
Commit: 110b3b33886ba2fff9827f69a08660d660a22e77
Parents: eeb5880
Author: Murat Sutunc <su...@gmail.com>
Authored: Mon Jul 27 11:39:38 2015 -0700
Committer: Murat Sutunc <su...@gmail.com>
Committed: Mon Jul 27 11:39:38 2015 -0700

----------------------------------------------------------------------
 src/windows/CameraProxy.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/110b3b33/src/windows/CameraProxy.js
----------------------------------------------------------------------
diff --git a/src/windows/CameraProxy.js b/src/windows/CameraProxy.js
index b70895d..d5bb11e 100644
--- a/src/windows/CameraProxy.js
+++ b/src/windows/CameraProxy.js
@@ -490,7 +490,7 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) {
                             return tempCapturedFile.openAsync(Windows.Storage.FileAccessMode.readWrite);
                         })
                         .then(function(fileStream) {
-                            return Windows.Storage.Streams.RandomAccessStream.copyAsync(finalStream, fileStream);
+                            return Windows.Storage.Streams.RandomAccessStream.copyAndCloseAsync(finalStream, fileStream);
                         })
                         .done(function() {
                             photoStream.close();
@@ -718,7 +718,7 @@ function savePhoto(picture, options, successCallback, errorCallback) {
                 resizeImageBase64(successCallback, errorCallback, picture, options.targetWidth, options.targetHeight);
             } else {
                 fileIO.readBufferAsync(picture).done(function(buffer) {
-                    var strBase64 =encodeToBase64String(buffer);
+                    var strBase64 = encodeToBase64String(buffer);
                     picture.deleteAsync().done(function() {
                         successCallback(strBase64);
                     }, function(err) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org