mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
use return value of regex_match to check whether a match was found
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37722 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6ca9f04412
commit
1e190a2af2
@ -549,12 +549,9 @@ string const replaceEnvironmentPath(string const & path)
|
||||
string result = path;
|
||||
while (1) {
|
||||
smatch what;
|
||||
regex_match(result, what, envvar_br_re);
|
||||
if (!what[0].matched) {
|
||||
regex_match(result, what, envvar_re);
|
||||
if (!what[0].matched) {
|
||||
if (!regex_match(result, what, envvar_br_re)) {
|
||||
if (!regex_match(result, what, envvar_re))
|
||||
break;
|
||||
}
|
||||
}
|
||||
string env_var = getEnv(what.str(2));
|
||||
result = what.str(1) + env_var + what.str(3);
|
||||
|
Loading…
Reference in New Issue
Block a user