- hook_path = talloc_asprintf (NULL, "%s/%s/%s/%s", db_path, ".notmuch",
- "hooks", hook);
+ hook_path = talloc_asprintf (notmuch, "%s/%s",
+ notmuch_config_get (notmuch, NOTMUCH_CONFIG_HOOK_DIR),
+ hook);
/* Check access before fork() for speed and simplicity of error handling. */
if (access (hook_path, X_OK) == -1) {
/* Ignore ENOENT. It's okay not to have a hook, hook dir, or even
/* Check access before fork() for speed and simplicity of error handling. */
if (access (hook_path, X_OK) == -1) {
/* Ignore ENOENT. It's okay not to have a hook, hook dir, or even