]> git.notmuchmail.org Git - notmuch/commit
util: Fix two corner-cases in boolean term quoting function
authorAustin Clements <amdragon@MIT.EDU>
Tue, 11 Mar 2014 20:42:00 +0000 (16:42 -0400)
committerDavid Bremner <david@tethera.net>
Sat, 15 Mar 2014 18:05:06 +0000 (15:05 -0300)
commit3fed6736a7ef8b8b1f05d0fabb136bdd3b5917ee
treedff4a62872f617e974054a8b51d197a5d1c41cba
parent8fcc3260a9a936de72d755e61d93d5a24380e8b7
util: Fix two corner-cases in boolean term quoting function

Previously, make_boolean_term did not quote empty boolean terms or
boolean terms that started with '('.  These cases are incompatible
with Xapian: empty terms cannot be omitted, and boolean terms that
start with '(' trigger an alternate term quoting syntax.

Fix this by quoting empty terms and terms that contain '('.
util/string-util.c