[PATCH] notmuch-mutt: check that the search cache Maildir is not a real Maildir WAS: Re: Data loss

Subject: [PATCH] notmuch-mutt: check that the search cache Maildir is not a real Maildir WAS: Re: Data loss

Date: Wed, 24 May 2023 08:59:57 +0800

To: notmuch

Cc:

From: Paul Wise


David Bremner wrote:

> Carl Worth <cworth@cworth.org> writes:
> 
> > What it could also do is create some placeholder file like
> > .NOTMUCH-MUTT-OUTPUT-DIR when it writes its output. And then it could
> > check for that file's existence before removing a directory.
> 
> Sounds reasonable to me. Would someone like to make a patch for
> notmuch-mutt?

This has the problem that the migration from existing search cache
Maildirs to the new setup needs users to do manual work and that they
or something else could later modify the migrated Maildir by adding
real mail data or subfolders containing real data.

I think a better option is to detect if the search cache Maildir is
actually a Maildir and doesn't contain any data that could be lost.

I have attached three patches I created to improve notmuch-mutt safety.

-- 
bye,
pabs

https://bonedaddy.net/pabs3/
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: