]> git.ipfire.org Git - pakfire.git/commitdiff
key: Don't access pakfire path directly
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Nov 2017 15:23:36 +0000 (16:23 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Nov 2017 15:23:36 +0000 (16:23 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/key.c

index 1e1a84feecc599bf18c63ea9fc8b8700c3f6358d..f38b6332e8ad7283c0133c65add99de66874b31c 100644 (file)
@@ -48,7 +48,8 @@ gpgme_ctx_t pakfire_get_gpgctx(Pakfire pakfire) {
                        goto FAIL;
 
                // Use GPG
-               char* home = pakfire_path_join(pakfire->path, "/etc/pakfire/gnupg");
+               const char* path = pakfire_get_path(pakfire);
+               char* home = pakfire_path_join(path, "etc/pakfire/gnupg");
                error = gpgme_set_engine_info(GPGME_PROTOCOL_OpenPGP, NULL, home);
                pakfire_free(home);
                if (gpg_err_code(error) != GPG_ERR_NO_ERROR)