From f69d9c7326a2546f9abfcb7ef6f484bb6512129c Mon Sep 17 00:00:00 2001 From: Anton Rudomanenko Date: Thu, 12 May 2022 15:58:35 +0300 Subject: [PATCH] fix the problem with replay routes locally (#24350) fix: fix the problem with replay routes locally Co-authored-by: Anton Rudomaneko old-commit-hash: 3bfe4a691ca99e6b89980131161652ce0d18670c --- selfdrive/ui/replay/route.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/replay/route.cc b/selfdrive/ui/replay/route.cc index 50ccc6156b..ad93263ae9 100644 --- a/selfdrive/ui/replay/route.cc +++ b/selfdrive/ui/replay/route.cc @@ -77,7 +77,11 @@ bool Route::loadFromLocal() { } void Route::addFileToSegment(int n, const QString &file) { - const QString name = QUrl(file).fileName(); + QString name = QUrl(file).fileName(); + + const int pos = name.lastIndexOf("--"); + name = pos != -1 ? name.mid(pos + 2) : name; + if (name == "rlog.bz2") { segments_[n].rlog = file; } else if (name == "qlog.bz2") {