mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
Merge pull request #433 from AnthonyWard/master
CB-13923 (android) fix -1 length for compressed files
This commit is contained in:
commit
6abd6d6b47
@ -263,6 +263,7 @@ public class CordovaResourceApi {
|
|||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
// Will occur if the file is compressed.
|
// Will occur if the file is compressed.
|
||||||
inputStream = assetManager.open(assetPath);
|
inputStream = assetManager.open(assetPath);
|
||||||
|
length = inputStream.available();
|
||||||
}
|
}
|
||||||
String mimeType = getMimeTypeFromPath(assetPath);
|
String mimeType = getMimeTypeFromPath(assetPath);
|
||||||
return new OpenForReadResult(uri, inputStream, mimeType, length, assetFd);
|
return new OpenForReadResult(uri, inputStream, mimeType, length, assetFd);
|
||||||
|
Loading…
Reference in New Issue
Block a user