]> git.ipfire.org Git - pakfire.git/commitdiff
repo: Pass on the correct error code if we could not open the database
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Jan 2025 17:06:23 +0000 (17:06 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Jan 2025 17:06:23 +0000 (17:06 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/repo.c

index 671297c0efa4f850901b5d1ddb4a471b5d589ea2..4062e1e03c14a9d4de32cbea9fa00d43abffa6b3 100644 (file)
@@ -579,7 +579,7 @@ static int pakfire_repo_read_database(struct pakfire_repo* repo, const char* pat
        f = fopen(path, "r");
        if (!f) {
                ERROR(repo->ctx, "Could not open package database at %s: %m\n", path);
-               r = 1;
+               r = -errno;
                goto ERROR;
        }