cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: File-transfer: delete target file on process error
Date Mon, 16 Jun 2014 15:01:07 GMT
I think this behaviour has been around for a while, and makes sense in the
majority of cases. Best practice is to download to a temporary location,
and then upon success move the file to its final spot.

That said, I think it'd be fine to add an option for not delete on error.


On Mon, Jun 16, 2014 at 5:39 AM, Javier Puerto <javier@apache.org> wrote:

> Hi Cordova developers,
>
> I'm creating a system to download/update several resources from a server to
> the device and I've observe a behaviour that breaks my use case.
>
> After fix the issue CB-6928, I'm able to download/update all the resources
> without problems. My next test was to try to download the resources but
> with no server response (stopped). I've found that the plugin is deleting
> my target file silently because there's was an error.
>
> I think that the developer should be the responsible to delete or leave the
> "corrupted" file because the file-transfer plugin already communicates the
> error, I don't think that the hardcoded behaviour is a good solution.  What
> do you think?
> I can open a new issue and provide the patch and test case (Android only)
>
> Best regards.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message