Remove temp files if GET fails, fixes owncloud/mirall#194

This commit is contained in:
Klaas Freitag 2012-12-19 12:41:16 +01:00
parent e5b95540e7
commit 3343601179

View file

@ -528,9 +528,10 @@ out:
if (rc != 0) {
st->instruction = CSYNC_INSTRUCTION_ERROR;
if (turi != NULL) {
/* FIXME: Think again if unlink makes sense. It does not for ownCloud */
/* csync_vio_unlink(ctx, turi); *
*/
if (_push_to_tmp_first(ctx)) {
/* Remove the tmp file in error case. */
csync_vio_unlink(ctx, turi);
}
}
}