infil00p closed pull request #433: CB-13923 (android) fix -1 length for 
compressed files

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/framework/src/org/apache/cordova/ 
index e725e2555..3c438e21b 100644
--- a/framework/src/org/apache/cordova/
+++ b/framework/src/org/apache/cordova/
@@ -263,6 +263,7 @@ public OpenForReadResult openForRead(Uri uri, boolean 
skipThreadCheck) throws IO
                 } catch (FileNotFoundException e) {
                     // Will occur if the file is compressed.
                     inputStream =;
+                    length = inputStream.available();
                 String mimeType = getMimeTypeFromPath(assetPath);
                 return new OpenForReadResult(uri, inputStream, mimeType, 
length, assetFd);


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to