mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-26 15:47:19 +02:00
Bug #856
- Fixed bug #856, which prevented filters on missing project from working (thanks to Michelle Crane).
This commit is contained in:
parent
373af5ba65
commit
a99aa217d0
3 changed files with 91 additions and 7 deletions
27
src/E9.cpp
27
src/E9.cpp
|
@ -472,14 +472,27 @@ void E9::operator_equal (
|
|||
// 'project' is matched leftmost.
|
||||
if (left._raw == "project")
|
||||
{
|
||||
unsigned int right_len = right._value.length ();
|
||||
if (compare (right._value,
|
||||
(right_len < left._value.length ()
|
||||
? left._value.substr (0, right_len)
|
||||
: left._value),
|
||||
case_sensitive))
|
||||
// Bug 856.
|
||||
//
|
||||
// Special case for checking absent projects. Without the explicit "" check
|
||||
// the right._value.lenghth() is used, which is 0, and therefore generates
|
||||
// a false match.
|
||||
if (right._value == "")
|
||||
{
|
||||
result._value = "true";
|
||||
if (left._value == "")
|
||||
result._value = "true";
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned int right_len = right._value.length ();
|
||||
if (compare (right._value,
|
||||
(right_len < left._value.length ()
|
||||
? left._value.substr (0, right_len)
|
||||
: left._value),
|
||||
case_sensitive))
|
||||
{
|
||||
result._value = "true";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue