aboutsummaryrefslogtreecommitdiff
path: root/src/ContentManager.cpp
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2021-10-23 01:44:37 +0200
committerToni Uhlig <matzeton@googlemail.com>2021-10-23 01:44:37 +0200
commitca7ca2218e07a24075cdc9d48e967cfdc2a3543b (patch)
tree69d0c5d6c0d064770a04b07faf005bc4fbbe7757 /src/ContentManager.cpp
parent09f45879c2b2e63689265924cb700dee5f02f653 (diff)
Improved Blog/Markdown URI base path handling.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/ContentManager.cpp')
-rw-r--r--src/ContentManager.cpp11
1 files changed, 5 insertions, 6 deletions
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<Content> 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;