cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [1/2] android commit: Fixing CB-2171, 0 byte file in filesystem on 404 from server. Patches are welcome.
Date Tue, 08 Jan 2013 21:54:56 GMT
Fixing CB-2171, 0 byte file in filesystem on 404 from server. Patches are welcome.


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/7ace1d65
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/7ace1d65
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/7ace1d65

Branch: refs/heads/master
Commit: 7ace1d652d665c850941531c18cdc55b9c7981b3
Parents: 72e0b49
Author: Joe Bowser <bowserj@apache.org>
Authored: Tue Jan 8 13:54:38 2013 -0800
Committer: Joe Bowser <bowserj@apache.org>
Committed: Tue Jan 8 13:54:38 2013 -0800

----------------------------------------------------------------------
 framework/src/org/apache/cordova/FileTransfer.java |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/7ace1d65/framework/src/org/apache/cordova/FileTransfer.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/FileTransfer.java b/framework/src/org/apache/cordova/FileTransfer.java
index fdc9c75..9bec20c 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) {


Mime
View raw message