Re: [PATCH v4 2/6] index: implement filtering attachments with an external program

Subject: Re: [PATCH v4 2/6] index: implement filtering attachments with an external program

Date: Sat, 04 Apr 2026 16:07:59 +0900

To: Anton Khirnov, notmuch@notmuchmail.org

Cc:

From: David Bremner


Anton Khirnov <anton@khirnov.net> writes:

> +
> +	flags |= O_NONBLOCK;
> +	ret = fcntl (pipes[i], F_SETFL, flags);
> +	if (ret == -1) {
> +	    _notmuch_database_log (db, "Error making the pipe non-blocking: %s\n",
> +				   strerror (errno));
> +	    goto CLOSE;
> +	}
> +    }
> +
> +    _filter_attachment_communicate (&pipes[0], &pipes[1],
> +				    &data, &data_len, db);

I hesitate to mention it, but I think this could reasonably be one line.

I was also annoyed by

>      body = (char *) g_byte_array_free (byte_array, false);
>  

But I realized I probably wrote it ;).

d

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: