From 3343601179e9727b6e60aaecc99aaf549384364b Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Wed, 19 Dec 2012 12:41:16 +0100 Subject: [PATCH] Remove temp files if GET fails, fixes owncloud/mirall#194 --- src/csync_propagate.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/csync_propagate.c b/src/csync_propagate.c index 0790ccdddd..bdbf7d57f9 100644 --- a/src/csync_propagate.c +++ b/src/csync_propagate.c @@ -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); + } } }