cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/2] cordova-plugin-file git commit: Fail with FileError.ENCODING_ERR on encoding exception.
Date Mon, 19 Oct 2015 22:22:19 GMT
Repository: cordova-plugin-file
Updated Branches:
  refs/heads/master 5f88e0110 -> 0f8c893e1


Fail with FileError.ENCODING_ERR on encoding exception.


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

Branch: refs/heads/master
Commit: c378dc61e69c905b09c793711959f3b687ecb078
Parents: d9ed7d5
Author: vladimir <vladimir@elitebook>
Authored: Wed Oct 7 09:09:52 2015 -0500
Committer: vladimir <vladimir@elitebook>
Committed: Wed Oct 7 09:09:52 2015 -0500

----------------------------------------------------------------------
 src/windows/FileProxy.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/c378dc61/src/windows/FileProxy.js
----------------------------------------------------------------------
diff --git a/src/windows/FileProxy.js b/src/windows/FileProxy.js
index f62cdc8..2a0ef15 100644
--- a/src/windows/FileProxy.js
+++ b/src/windows/FileProxy.js
@@ -561,7 +561,12 @@ module.exports = {
 
                 return stream.readAsync(buffer, readSize, Windows.Storage.Streams.InputStreamOptions.none);
             }).done(function(buffer) {
-                win(Windows.Security.Cryptography.CryptographicBuffer.convertBinaryToString(encoding,
buffer));
+            	try {
+            		win(Windows.Security.Cryptography.CryptographicBuffer.convertBinaryToString(encoding,
buffer));
+                }
+                catch (e) {
+                	fail(FileError.ENCODING_ERR);
+                }
             },function() {
                 fail(FileError.NOT_FOUND_ERR);
             });


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


Mime
View raw message