[Verification] Code compiles without errors.
find() with contentURI filter works fine.
TCT passrate 100%.
Change-Id: I9994a6b8b8fbfdaaa14bcf07aba5c83bad06abdf
Signed-off-by: Piotr Kosko <p.kosko@samsung.com>
matchValue = "4";
}
} else if (name == "contentURI") {
- //simple convertion of URI to globalpath
- matchValue = matchValue.substr(strlen("file://"));
+ const char* uri_prefix = "file://";
+ size_t found = matchValue.find(uri_prefix);
+ if (found != std::string::npos) {
+ //simple convertion of URI to globalpath
+ matchValue = matchValue.substr(found + strlen(uri_prefix));
+ }
}
switch (match_flag) {
case AttributeMatchFlag::kStartsWith :