You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Clayton Grassick (JIRA)" <ji...@apache.org> on 2013/01/09 01:10:12 UTC
[jira] [Reopened] (CB-2171) FileTransfer.download leaves 0 byte
file in filesystem on 404 from server
[ https://issues.apache.org/jira/browse/CB-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Clayton Grassick reopened CB-2171:
----------------------------------
outputStream = new FileOutputStream(file);
should happen *after*
inputStream = getInputStream(connection);
to prevent the issue, not before.
> FileTransfer.download leaves 0 byte file in filesystem on 404 from server
> -------------------------------------------------------------------------
>
> Key: CB-2171
> URL: https://issues.apache.org/jira/browse/CB-2171
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 2.3.0
> Environment: Android 2.3.
> Reporter: Clayton Grassick
> Assignee: Joe Bowser
> Fix For: 2.4.0
>
>
> To reproduce:
> Call fileTransfer.download, passing a URL which returns 404.
> Error callback will be correctly fired. But 0-byte file will be left on filesystem. This is because:
> FileOutputStream outputStream = new FileOutputStream(file);
> is called before the getInputStream is called.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira