summaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib
diff options
context:
space:
mode:
authorDaniil Cherednik <[email protected]>2022-11-24 13:14:34 +0300
committerDaniil Cherednik <[email protected]>2022-11-24 14:46:00 +0300
commit87f7fceed34bcafb8aaff351dd493a35c916986f (patch)
tree26809ec8f550aba8eb019e59adc3d48e51913eb2 /library/cpp/monlib
parent11bc4015b8010ae201bf3eb33db7dba425aca35e (diff)
Ydb stable 22-4-4322.4.43
x-stable-origin-commit: 8d49d46cc834835bf3e50870516acd7376a63bcf
Diffstat (limited to 'library/cpp/monlib')
-rw-r--r--library/cpp/monlib/service/pages/index_mon_page.cpp7
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);