]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.cpp
Fix samba related crashes
[lyx.git] / src / support / filetools.cpp
index 9b3fd80c49fe742b16ad76c51ae3494103e5ac4e..65e49765e9ea05e70c89260eb9722edabe5f2661 100644 (file)
@@ -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);