Conflicts:
	indra/llvfs/lldiriterator.cpp
	indra/newview/app_settings/settings.xml
	indra/newview/llviewerregion.cpp
This commit is contained in:
Siana Gearz
2011-07-21 00:20:06 +02:00
339 changed files with 8700 additions and 4498 deletions

View File

@@ -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;
}