X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fdatabase.cc;h=5577aaf9f48ce5974d692721735122c7ff6ba5d3;hb=5e438d95c4671844cf4fddbd16c5744f41cda85c;hp=66ee267fe50ebb89b3e5feda2d4b88089d414800;hpb=9b60dc3cd9224eddfe9bc5cf74eeaa5f0d599d04;p=notmuch diff --git a/lib/database.cc b/lib/database.cc index 66ee267f..5577aaf9 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -260,10 +260,10 @@ static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = { { "id", "Q" }, { "path", "P" }, /* - * Without the ":", since this is a multi-letter prefix, Xapian - * will add a colon itself if the first letter of the path is - * upper-case ASCII. Including the ":" forces there to always be a - * colon, which keeps our own logic simpler. + * Unconditionally add ':' to reduce potential ambiguity with + * overlapping prefixes and/or terms that start with capital + * letters. See Xapian document termprefixes.html for related + * discussion. */ { "folder", "XFOLDER:" }, }; @@ -383,6 +383,22 @@ _notmuch_database_log (notmuch_database_t *notmuch, talloc_free (notmuch->status_string); notmuch->status_string = talloc_vasprintf (notmuch, format, va_args); + va_end (va_args); +} + +void +_notmuch_database_log_append (notmuch_database_t *notmuch, + const char *format, + ...) +{ + va_list va_args; + + va_start (va_args, format); + + if (notmuch->status_string) + notmuch->status_string = talloc_vasprintf_append (notmuch->status_string, format, va_args); + else + notmuch->status_string = talloc_vasprintf (notmuch, format, va_args); va_end (va_args); }