unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Carl Worth <cworth@cworth.org>
To: Michael J Gruber <michaeljgruber+grubix+git@gmail.com>
Cc: fulviopizzigoni@libero.it, notmuch@notmuchmail.org
Subject: Re: Data loss
Date: Tue, 04 Apr 2023 09:15:33 -0700	[thread overview]
Message-ID: <878rf7k4ii.fsf@wondoo.home.cworth.org> (raw)
In-Reply-To: <CAA19uiS86GLKDM42HENqndqAXZVnqRppd+A8gAQEyJZOC303BA@mail.gmail.com>

On Tue, Apr 04 2023, Michael J. Gruber wrote:
>> It's really unfortunate if notmuch-mutt makes it that easy to throw away
>> your email.
>>
>> That sounds like a nasty bug that should be fixed in that program.
>
> To be fair to notmuch-mutt:
> ```
> --output-dir DIR
>
> Store search results as (symlink) messages under maildir DIR. Beware: DIR will
> be overwritten. (Default: F<~/.cache/notmuch/mutt/results/>)
> ```
> So the default is safe, and the warning is there. It would be a bug
> only if notmuch-mutt descended up and deleted a root dir or such.

OK. It's definitely acting as documented. So maybe "bug" was a little
harsh in my description.

It could still be made safer, and I think it would be a good idea to
change it.

For example, notmuch-mutt currently happily creates a directory that
doesn't already exists. That's safe and good.

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.

-Carl

  reply	other threads:[~2023-04-04 16:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ZCr1n0eXGidJGZK6@localhost.localdomain>
     [not found] ` <874jpxkk2d.fsf@wondoo.home.cworth.org>
2023-04-03 17:42   ` Data loss Fulvio Pizzigoni
2023-04-03 18:38     ` David Bremner
2023-04-03 20:36       ` Fulvio Pizzigoni
2023-04-03 18:39     ` Michael J Gruber
2023-04-03 21:04       ` Fulvio Pizzigoni
2023-04-03 22:54         ` Carl Worth
2023-04-04  8:15           ` Michael J Gruber
2023-04-04 16:15             ` Carl Worth [this message]
2023-04-08 13:01               ` David Bremner
2023-05-24  0:59                 ` [PATCH] notmuch-mutt: check that the search cache Maildir is not a real Maildir WAS: " Paul Wise
2023-05-28  0:10                   ` David Bremner
2023-05-28  2:27                     ` Paul Wise
2023-05-28  2:29                       ` [PATCH v2 1/3] notmuch-mutt: clarify the empty Maildir function operates on search caches Paul Wise
2023-05-28  2:29                         ` [PATCH v2 2/3] notmuch-mutt: do not clear search cache Maildir when nothing is found Paul Wise
2023-05-28  2:29                         ` [PATCH v2 3/3] notmuch-mutt: check that the search cache Maildir is not a real Maildir Paul Wise
2023-05-28  2:32                         ` [PATCH v3 " Paul Wise
2023-05-28 18:53                           ` David Bremner
2023-05-28 19:12                           ` David Bremner
2023-10-12  8:14                           ` [PATCH] notmuch-mutt: fix Perl syntax of hash index lookups Paul Wise
2023-10-12 14:53                             ` Tomi Ollila
2023-10-12 22:59                             ` David Bremner

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

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rf7k4ii.fsf@wondoo.home.cworth.org \
    --to=cworth@cworth.org \
    --cc=fulviopizzigoni@libero.it \
    --cc=michaeljgruber+grubix+git@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /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 public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).