Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
stdio_fetch: properly test for an error while fetching
Baptiste Daroussin committed 2 years ago
commit d8d868069d64837726f5e46d82a97fbaa32a8713
parent 7bdd4df
1 file changed +1 -1
modified libpkg/fetch_file.c
@@ -101,7 +101,7 @@ stdio_fetch(struct pkg_repo *repo, int dest, struct fetch_item *fi)
		if (fi->size > 0)
			pkg_emit_progress_tick(done, fi->size);
	}
-
	if (r != 0) {
+
	if (ferror(repo->fh)) {
		pkg_emit_error("An error occurred while fetching package");
		return(EPKG_FATAL);
	}