linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #07269
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3331: fix NMDC searches
------------------------------------------------------------
revno: 3331
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Thu 2013-08-01 21:37:09 +0200
message:
fix NMDC searches
modified:
dcpp/ShareManager.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/ShareManager.cpp'
--- dcpp/ShareManager.cpp 2013-07-31 21:49:25 +0000
+++ dcpp/ShareManager.cpp 2013-08-01 19:37:09 +0000
@@ -1007,7 +1007,8 @@
root = TTHValue(nmdcString.substr(4));
} else {
- for(auto& term: StringTokenizer<string>(Text::toLower(nmdcString), '$').getTokens()) {
+ StringTokenizer<string> tok(Text::toLower(nmdcString), '$');
+ for(auto& term: tok.getTokens()) {
if(!term.empty()) {
includeInit.emplace_back(term);
}
@@ -1068,7 +1069,7 @@
unique_ptr<StringSearch::List> newTerms;
for(auto& term: *query.include) {
- if(term.match(name) && !query.isExcluded(name)) {
+ if(term.match(name)) {
if(!newTerms) {
newTerms.reset(new StringSearch::List(*query.include));
}