Fix comparison of document path with candidate name

This check is so that we always include the current document, even if the exclude/binary globs are setup to exclude it.
This commit is contained in:
Allan Odgaard
2014-04-17 17:26:11 +07:00
parent 7c6594012e
commit fcae942927

View File

@@ -2117,10 +2117,10 @@ namespace
path::glob_t const binaryGlob(settings.get(kSettingsBinaryKey, ""));
std::vector<std::string> v;
for(auto const& path : candidates)
for(auto const& name : candidates)
{
if(path == documentPath || !binaryGlob.does_match(path) && !excludeGlob.does_match(path))
v.push_back(path);
if(name == documentName || !binaryGlob.does_match(name) && !excludeGlob.does_match(name))
v.push_back(name);
}
if(v.size() == 1)