From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: stlman@poczta.fm
Cc: Eli Zaretskii <eliz@gnu.org>, 67890@debbugs.gnu.org
Subject: bug#67890: 28.2; nnmaildir silently deletes messages upon expiration
Date: Thu, 04 Jan 2024 08:32:24 -0800 [thread overview]
Message-ID: <87cyuagqah.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87edfjgl9o.fsf%stlman@poczta.fm>
Weird, this is in my Sent folder, but obviously never was actually sent.
I was wondering why no one responded...
Łukasz Stelmach <stlman@poczta.fm> writes:
> I believe I've found a bug leading to a data loss situation.
>
> Steps to reproduce.
Thanks for the very detailed report! Obviously the `nnmaildir--pgname'
problem needs to be fixed, but otherwise it seems like the unlinking
step is also a clear bug: we should not be deleting the message if it
wasn't successfully expired someplace, right?
I'm thinking the end of the `t` clause in the cond there should look
like this:
(when (and (stringp target)
(not (string-equal target pgname))) ;; Move it.
(erase-buffer)
(nnheader-insert-file-contents nnmaildir--file)
(let ((group-art (gnus-request-accept-article
target nil nil 'no-encode)))
(if group-art
(progn
(when (consp group-art)
;; Maybe also copy: dormant forward reply save tick
;; (gnus-add-mark? gnus-request-set-mark?)
(gnus-group-mark-article-read target (cdr group-art)))
;; Article was successfully moved, delete the original.
(nnmaildir--unlink nnmaildir--file)
(nnmaildir--expired-article group article))
;; Leave it here.
(setq didnt (cons (nnmaildir--art-num article) didnt)))))
It looks to me like `gnus-request-accept-article` can return a
(group . article) cons, a symbol, or nil for failure. If we get a nil,
we shouldn't remove the original article.
Does that seem reasonable?
Eric
next prev parent reply other threads:[~2024-01-04 16:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 23:10 bug#67890: 28.2; nnmaildir silently deletes messages upon expiration Łukasz Stelmach
2023-12-23 9:54 ` Eli Zaretskii
2023-12-24 16:38 ` Eric Abrahamsen
2024-01-09 19:58 ` Eli Zaretskii
2024-01-04 16:32 ` Eric Abrahamsen [this message]
2024-01-10 19:18 ` Łukasz Stelmach
2024-01-04 16:32 ` Eric Abrahamsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87cyuagqah.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=67890@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=stlman@poczta.fm \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.