On 2026-06-03 02:51:34 +0000, David Haguenauer wrote:
> Perhaps some background process on his system touched the file that
> backs the attachment just before sending? This is probably difficult
> to investigate after the fact.

I don't see why some background process would do that.

In check_attachments (compose.c), Mutt does

    if (stat(actx->idx[i]->content->filename, &st) != 0)
[stat error handling]
    if (actx->idx[i]->content->stamp < st.st_mtime)
[case "Attachment #%d modified. Update encoding for %s?"]

So here, actx->idx[i]->content->stamp was strictly less than the
timestamp from the above stat. But how is actx->idx[i]->content->stamp
set? And is it always set or could have it been let uninitialized?

If it was set by

void mutt_stamp_attachment(BODY *a)
{
  a->stamp = time(NULL);
}

(in sendlib.c), is it guaranteed that the filesystem uses the same
clock as time()? This might not be the case because according to
/usr/bin/stat, the filesystem here has a time resolution of less
than 1 second while time() has a 1-second time resolution.

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)

Reply via email to