Fix tor component regex

This commit is contained in:
Linh Kikuchi
2023-02-17 17:06:35 +09:00
parent 6c3ee5847b
commit ac80352931
+1 -1
View File
@@ -40,7 +40,7 @@ std::pair<base::FilePath, base::FilePath> InitTorPath(
base::FileEnumerator::FileInfo file_info = traversal.GetInfo();
if (RE2::FullMatch(
file_info.GetName().MaybeAsASCII(),
"tor-\\d+\\.\\d+\\.\\d+\\.\\d+-\\w+|\\w+-\\w+-brave-\\d+")) {
"tor-\\d+\\.\\d+\\.\\d+\\.\\d+-\\w+(-\\w+)?-brave-\\d+")) {
executable_path = current;
} else if (file_info.GetName().MaybeAsASCII() == "tor-torrc") {
torrc_path = current;