]> git.ipfire.org Git - pakfire.git/commitdiff
repos: Fix re-reading repository key
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 Jun 2023 20:26:09 +0000 (20:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 Jun 2023 20:26:09 +0000 (20:26 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/repo.c

index 1055ce180bb477dcf6274e1e0f9b201d5dc46aef..ded2237fc593a5571a5fb78d5e4fac0125b184a3 100644 (file)
@@ -187,7 +187,7 @@ static int pakfire_repo_import_key(struct pakfire_repo* repo, const char* data)
 
        // If the key could be successfully imported, we will store it in the appdata
        repo->appdata->key = strdup(data);
-       if (repo->appdata->key) {
+       if (!repo->appdata->key) {
                ERROR(repo->pakfire, "Could not copy the key to appdata: %m\n");
                r = 1;
                goto ERROR;