@pmatilai commented on this pull request.


> @@ -96,6 +100,50 @@ static rpmRC write_key_to_disk(rpmPubkey key, string & 
> dir, string & filename, i
     return rc;
 }
 
+rpmRC rebuild_dir(rpmtxn txn, keystore * store, rpmKeyring keys)
+{
+
+    auto macros = rpm::macros();
+    auto [mrc, keyringpath] = macros.expand("%{_keyringpath}");
+    while ('/' == keyringpath.back())
+       keyringpath.pop_back();

Just use expand_path(), it'll do this for you. There's actually bug in this 
version: it'd crash if the path only contained /'s.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3474#pullrequestreview-2468157678
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3474/review/2468157...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to