Apache Cordova
  1. Apache Cordova
  2. CB-2171

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.4.0
    • Component/s: 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.

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development