From 2a59ea72fd170139cbf543d5d132a2e583b3aba9 Mon Sep 17 00:00:00 2001 From: Piotr Kosko Date: Wed, 17 Jun 2015 15:28:16 +0200 Subject: [PATCH] [Content] Filter fixed for contentUri [Verification] Finding content by uri is possible. Change-Id: I5fba83a17aa1572ada1ba8030c91de2167d31aa6 Signed-off-by: Piotr Kosko --- src/content/content_filter.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content/content_filter.cc b/src/content/content_filter.cc index 132e6f8e..a962c3ab 100755 --- a/src/content/content_filter.cc +++ b/src/content/content_filter.cc @@ -127,7 +127,6 @@ PlatformResult ContentFilter::BuildQuery(const picojson::object& jsFilter, LoggerE("INVALID_VALUES_ERR"); return PlatformResult(ErrorCode::INVALID_VALUES_ERR); } - if (AttributeMatchFlag::kExists != match_flag) { query.append("\""); matchValue = escapeValueString(JsonCast(match_value)); @@ -141,6 +140,9 @@ PlatformResult ContentFilter::BuildQuery(const picojson::object& jsFilter, } else { // OTHER matchValue = "4"; } + } else if (name == "contentURI") { + //simple convertion of URI to globalpath + matchValue = matchValue.substr(strlen("file://")); } switch (match_flag) { case AttributeMatchFlag::kStartsWith : -- 2.34.1