Skip to content

gpgme-keyring: Also monitor .kbx in gpg homedir

Niels De Graef requested to merge feature/fix-missing-imports-of-gpgme-keys into master

Seahorse monitors changes on the GPG home diretory to make sure that keys that get imported automagically show up as well in the UI, even as it's running.

To make sure we don't refresh too often, the monitor filters out certain GFileMonitorEvents, as well as making sure it only filters on the keyring by checking on a ".gpg" extension.

This stops working from GPG 2.1 onwards however, as that version introduced a merged keyring, pubring.kbx. From that point on, our filter failed, as it also occluded any change in that new format.

Fix this by also checking for filenames ending in ".kbx".

Cleaning up the function as we're changing stuff in it anyway (and fixing a tiny memory leak).

Fixes #171 (closed)

Merge request reports