diff --git a/framework/src/org/apache/cordova/FileTransfer.java b/framework/src/org/apache/cordova/FileTransfer.java index fdc9c75d..9bec20c9 100644 --- a/framework/src/org/apache/cordova/FileTransfer.java +++ b/framework/src/org/apache/cordova/FileTransfer.java @@ -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) {