From: Michael Schroeder Date: Wed, 18 Dec 2024 10:00:35 +0000 (+0100) Subject: Allow an empty index file in repo_add_apk_repo X-Git-Tag: 0.7.32~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5059a587b67f8816eff5af328e3a52199a1e8708;p=thirdparty%2Flibsolv.git Allow an empty index file in repo_add_apk_repo --- diff --git a/ext/repo_apk.c b/ext/repo_apk.c index 481d63e1..f1743686 100644 --- a/ext/repo_apk.c +++ b/ext/repo_apk.c @@ -498,7 +498,7 @@ repo_add_apk_repo(Repo *repo, FILE *fp, int flags) /* peek into first byte to find out if this is a compressed file */ c = fgetc(fp); if (c == EOF) - return -1; + return (flags & APK_ADD_INDEX) != 0 ? 0 : -1; /* an empty file is allowed for the v2 index */ ungetc(c, fp); if (c == 0x1f)