mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
CB-13923 (android) fix -1 length for compressed files
This commit is contained in:
parent
eddad666ff
commit
e456a325f9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user