Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-2171

FileTransfer.download leaves 0 byte file in filesystem on 404 from server

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.4.0
    • Component/s: cordova-android
    • Labels:
      None
    • Environment:

      Android 2.3.

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              bowserj Joe Bowser
              Reporter:
              cgrassick Clayton Grassick
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: