From c0b0bb554cb4b9bebfad64a2d1cf89dea3dd6964 Mon Sep 17 00:00:00 2001 From: Trey Moen <50057480+greatgitsby@users.noreply.github.com> Date: Sat, 26 Apr 2025 13:43:18 -0700 Subject: [PATCH] fix(replay): search for route key in entire str (#35081) fix(replay): look at whole segment string --- tools/replay/route.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/replay/route.cc b/tools/replay/route.cc index 7731d0daf4..ff5a858e8c 100644 --- a/tools/replay/route.cc +++ b/tools/replay/route.cc @@ -121,7 +121,7 @@ bool Route::loadFromJson(const std::string &json) { bool Route::loadFromLocal() { std::string pattern = route_.timestamp + "--"; for (const auto &entry : std::filesystem::directory_iterator(data_dir_)) { - if (entry.is_directory() && entry.path().filename().string().find(pattern) == 0) { + if (entry.is_directory() && entry.path().filename().string().find(pattern) != std::string::npos) { std::string segment = entry.path().string(); int seg_num = std::atoi(segment.substr(segment.rfind("--") + 2).c_str());