This is an automated email from the ASF dual-hosted git repository.

brodybits pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/cordova-android.git

commit 1702b6470fdcb7b74e2e0981b0787bf2e565b920
Author: Anthony Ward <anthonyward@Anthonys-MacBook-Pro.local>
AuthorDate: Tue Feb 27 12:39:30 2018 +0000

    CB-13923 (android) fix -1 length for compressed files
---
 framework/src/org/apache/cordova/CordovaResourceApi.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/framework/src/org/apache/cordova/CordovaResourceApi.java 
b/framework/src/org/apache/cordova/CordovaResourceApi.java
index e725e25..3c438e2 100644
--- a/framework/src/org/apache/cordova/CordovaResourceApi.java
+++ b/framework/src/org/apache/cordova/CordovaResourceApi.java
@@ -263,6 +263,7 @@ public class CordovaResourceApi {
                 } catch (FileNotFoundException e) {
                     // Will occur if the file is compressed.
                     inputStream = assetManager.open(assetPath);
+                    length = inputStream.available();
                 }
                 String mimeType = getMimeTypeFromPath(assetPath);
                 return new OpenForReadResult(uri, inputStream, mimeType, 
length, assetFd);


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

Reply via email to