mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-04-21 01:56:24 +08:00
CB-9413 Close RandomAccessStream once copied
This commit is contained in:
parent
eeb5880580
commit
110b3b3388
@ -490,7 +490,7 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) {
|
|||||||
return tempCapturedFile.openAsync(Windows.Storage.FileAccessMode.readWrite);
|
return tempCapturedFile.openAsync(Windows.Storage.FileAccessMode.readWrite);
|
||||||
})
|
})
|
||||||
.then(function(fileStream) {
|
.then(function(fileStream) {
|
||||||
return Windows.Storage.Streams.RandomAccessStream.copyAsync(finalStream, fileStream);
|
return Windows.Storage.Streams.RandomAccessStream.copyAndCloseAsync(finalStream, fileStream);
|
||||||
})
|
})
|
||||||
.done(function() {
|
.done(function() {
|
||||||
photoStream.close();
|
photoStream.close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user