mirror of
https://github.com/apache/cordova-android.git
synced 2025-03-04 00:13:20 +08:00
Fixing CB-2171, 0 byte file in filesystem on 404 from server. Patches are welcome.
This commit is contained in:
parent
72e0b49e0b
commit
7ace1d652d
@ -676,10 +676,11 @@ public class FileTransfer extends CordovaPlugin {
|
|||||||
progress.setTotal(connection.getContentLength());
|
progress.setTotal(connection.getContentLength());
|
||||||
}
|
}
|
||||||
|
|
||||||
FileOutputStream outputStream = new FileOutputStream(file);
|
FileOutputStream outputStream = null;
|
||||||
InputStream inputStream = null;
|
InputStream inputStream = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
outputStream = new FileOutputStream(file);
|
||||||
inputStream = getInputStream(connection);
|
inputStream = getInputStream(connection);
|
||||||
synchronized (context) {
|
synchronized (context) {
|
||||||
if (context.aborted) {
|
if (context.aborted) {
|
||||||
|
Loading…
Reference in New Issue
Block a user