From 24824b54ce6ce3f62417be493d1e29eeb2cc8f53 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 18 Aug 2011 14:17:30 -0400 Subject: dload: add 'unlink_on_fail' to payload struct Let callers of _alpm_download state whether we should delete on fail, rather than inferring it from context. We still override this decision and always unlink when a temp file is used. Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- lib/libalpm/be_sync.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libalpm/be_sync.c') diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index 2db7ce58..75f06645 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -197,6 +197,7 @@ int SYMEXPORT alpm_db_update(int force, alpm_db_t *db) snprintf(payload->fileurl, len, "%s/%s.db", server, db->treename); payload->handle = handle; payload->force = force; + payload->unlink_on_fail = 1; ret = _alpm_download(payload, syncpath, NULL); -- cgit v1.2.3-24-g4f1b