forked from github/cordova-android
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());
|
||||
}
|
||||
|
||||
FileOutputStream outputStream = new FileOutputStream(file);
|
||||
FileOutputStream outputStream = null;
|
||||
InputStream inputStream = null;
|
||||
|
||||
try {
|
||||
outputStream = new FileOutputStream(file);
|
||||
inputStream = getInputStream(connection);
|
||||
synchronized (context) {
|
||||
if (context.aborted) {
|
||||
|
Loading…
Reference in New Issue
Block a user