librepo/0001-Make-sure-to-check-next-transfer-if-current-zck-tran.patch
Jonathan Dieter 79c4077f65 Add upstream patch to make sure to check next transfer
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
2019-05-23 19:16:14 +01:00

37 lines
1.3 KiB
Diff

From 42ab00919b7415ce92ab33388398e97609805021 Mon Sep 17 00:00:00 2001
From: Jonathan Dieter <jdieter@gmail.com>
Date: Thu, 16 May 2019 20:43:37 +0100
Subject: [PATCH] Make sure to check next transfer if current zck transfer
already exists
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
---
librepo/downloader.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/librepo/downloader.c b/librepo/downloader.c
index ad778d3..6189681 100644
--- a/librepo/downloader.c
+++ b/librepo/downloader.c
@@ -1450,7 +1450,7 @@ prepare_next_transfer(LrDownload *dd, gboolean *candidatefound, GError **err)
goto fail;
}
- // If zchunk is finished, we're done
+ // If zchunk is finished, we're done, so move to next target
if(target->zck_state == LR_ZCK_DL_FINISHED) {
g_debug("%s: Target already fully downloaded: %s", __func__, target->target->path);
target->state = LR_DS_FINISHED;
@@ -1461,7 +1461,7 @@ prepare_next_transfer(LrDownload *dd, gboolean *candidatefound, GError **err)
fclose(target->f);
target->f = NULL;
lr_downloadtarget_set_error(target->target, LRE_OK, NULL);
- return TRUE;
+ return prepare_next_transfer(dd, candidatefound, err);
}
}
# endif /* WITH_ZCHUNK */
--
2.21.0