On Thu, Dec 10 2015, Daniel Kahn Gillmor <d...@fifthhorseman.net> wrote:
> When the notmuch database needs to find gpg, have it search reasonable > paths first. > --- > lib/database.cc | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/lib/database.cc b/lib/database.cc > index 62bc6d9..d0e8800 100644 > --- a/lib/database.cc > +++ b/lib/database.cc > @@ -2393,6 +2393,17 @@ _notmuch_database_link_message (notmuch_database_t > *notmuch, > return status; > } > > +static const char* > +_notmuch_database_get_gpg_path (notmuch_database_t *notmuch) > +{ > +#define try_gpg_path(z) if (!access(z, X_OK)) return z > + try_gpg_path("/usr/bin/gpg2"); > + try_gpg_path("/bin/gpg2"); > + try_gpg_path("/usr/bin/gpg"); > + try_gpg_path("/bin/gpg"); > + return NULL; > +} If this were to survive longer, BSD folks would like to have /usr/local/bin checked... (i don't know (yet) about os x _______________________________________________ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch