Re: [notmuch] [PATCH] Handle rename of message file

Subject: Re: [notmuch] [PATCH] Handle rename of message file

Date: Wed, 18 Nov 2009 19:12:50 -0800

To: Mikhail Gusarov, notmuch@notmuchmail.org

Cc:

From: Keith Packard


On Thu, 19 Nov 2009 08:11:12 +0600, Mikhail Gusarov <dottedmag@dottedmag.net> wrote:
> 
> Twas brillig at 18:06:09 18.11.2009 UTC-08 when keithp@keithp.com did gyre and gimble:
> 
>  KP> Checking for new files is easy; notmuch already does that, and so
>  KP> handling renames doesn't seem all that difficult.
> 
> Except rename does not change mtime of file, and so it won't be picked
> up by 'notmuch new'.

Yeah, good point -- notmuch new doesn't make sure each file it finds is
already in the database. Again, some kind of inotify-based daemon would
make that efficient, while starting up that daemon could take some time
while the database was searched for new or missing files.

Alternatively, we could record the contents of the directory after
scanning it and then use that to track file changes. It seems like the
current database just doesn't have enough information to make this
tractable.

--
keith.packard@intel.com

part-000.sig (application/pgp-signature)

Thread: