Merge branch 'V2Mesh' of https://github.com/Shyotl/SingularityViewer into future
Conflicts: indra/llvfs/lldiriterator.cpp indra/newview/app_settings/settings.xml indra/newview/llviewerregion.cpp
This commit is contained in:
@@ -128,6 +128,14 @@ bool LLDirIterator::Impl::next(std::string &fname)
|
||||
return found;
|
||||
}
|
||||
|
||||
/**
|
||||
Converts the incoming glob into a regex. This involves
|
||||
converting incoming glob expressions to regex equivilents and
|
||||
at the same time, escaping any regex meaningful characters which
|
||||
do not have glob meaning, i.e.
|
||||
.()+|^$
|
||||
in the input.
|
||||
*/
|
||||
std::string glob_to_regex(const std::string& glob)
|
||||
{
|
||||
std::string regex;
|
||||
@@ -174,16 +182,16 @@ std::string glob_to_regex(const std::string& glob)
|
||||
case '!':
|
||||
regex+= square_brace_open ? '^' : c;
|
||||
break;
|
||||
case '.': // This collection have different regex meaning
|
||||
case '^': // And so need escaping
|
||||
case '(':
|
||||
case '.': // This collection have different regex meaning
|
||||
case '^': // and so need escaping.
|
||||
case '(':
|
||||
case ')':
|
||||
case '+':
|
||||
case '|':
|
||||
case '$':
|
||||
regex+='\\';
|
||||
regex += '\\';
|
||||
default:
|
||||
regex+=c;
|
||||
regex += c;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user