From ca7ca2218e07a24075cdc9d48e967cfdc2a3543b Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Sat, 23 Oct 2021 01:44:37 +0200 Subject: Improved Blog/Markdown URI base path handling. Signed-off-by: Toni Uhlig --- src/ContentManager.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/ContentManager.cpp') diff --git a/src/ContentManager.cpp b/src/ContentManager.cpp index da1ab65..d73122a 100644 --- a/src/ContentManager.cpp +++ b/src/ContentManager.cpp @@ -19,6 +19,11 @@ bool ContentManager::RegisterModule(std::shared_ptr ctnt) #endif m_ContentModules[basePath] = ctnt; + if (basePath.back() == '/') + { + basePath.pop_back(); + } + return true; } @@ -53,12 +58,6 @@ bool ContentManager::InitAll(void) } m_ContentModulesRoutes[redirect] = content.second; } - - std::string & basePath = content.second->GetUriBasePath(); - if (basePath.back() == '/') - { - basePath.pop_back(); - } } return ret; -- cgit v1.2.3