diff options
Diffstat (limited to 'library/cpp/monlib')
| -rw-r--r-- | library/cpp/monlib/service/pages/index_mon_page.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/library/cpp/monlib/service/pages/index_mon_page.cpp b/library/cpp/monlib/service/pages/index_mon_page.cpp index de2a5a058cd..2bfa0faca81 100644 --- a/library/cpp/monlib/service/pages/index_mon_page.cpp +++ b/library/cpp/monlib/service/pages/index_mon_page.cpp @@ -97,7 +97,6 @@ TIndexMonPage* TIndexMonPage::RegisterIndexPage(const TString& path, const TStri IMonPage* TIndexMonPage::FindPage(const TString& relativePath) { TGuard<TMutex> g(Mtx); - Y_VERIFY(!relativePath.StartsWith('/')); TPagesByPath::iterator i = PagesByPath.find("/" + relativePath); if (i == PagesByPath.end()) { return nullptr; @@ -109,10 +108,10 @@ IMonPage* TIndexMonPage::FindPage(const TString& relativePath) { IMonPage* TIndexMonPage::FindPageByAbsolutePath(const TString& absolutePath) { TIndexMonPage* page = this; TString path = absolutePath; - if (path.StartsWith("/")) { - path.erase(0, 1); - } while (!path.empty()) { + while (path.StartsWith('/')) { + path.erase(0, 1); + } TString tryPath = path; while (!tryPath.empty()) { IMonPage* found = page->FindPage(tryPath); |
