Re: [PATCH 1/2] Add 'cat' subcommand

Subject: Re: [PATCH 1/2] Add 'cat' subcommand

Date: Fri, 23 Apr 2010 12:07:21 -0700

To: Michal Sojka

Cc: notmuch@notmuchmail.org

From: Carl Worth


On Thu, 22 Apr 2010 08:38:54 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> If a filename:dir/file term is present in the query, it will be
> necessary to first query the database for directory:dir to find the
> <directory_ID> and then put in the query
> file-direntry:<directory_ID>:file. This conversion is already
> implemented in _notmuch_database_filename_to_direntry(). Right?

Yes.

> _notmuch_database_filename_to_direntry() requires writable database as
> it creates the directory document if it doesn't exist. This is probably
> not what we want for filename: queries - if the user types the filename
> incorrectly, the nonexisting directory document could be added to the
> database. So I think that _notmuch_database_find_directory_id() should
> be modified to not modify the database. The directory documents should
> be created somewhere else in notmuch new path. Do you agree?

Yes. Good job anticipating that failure mode before we ran into it.

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

Thread: