Ensure that default custom_pages_dir ends with trailing slash

This commit is contained in:
Danilo Bargen 2021-12-20 00:26:16 +01:00
commit 6508ec6ac6

View file

@ -173,7 +173,10 @@ impl Default for RawDirectoriesConfig {
fn default() -> Self {
Self {
custom_pages_dir: get_app_root(AppDataType::UserData, &crate::APP_INFO)
.map(|path| path.join("pages"))
.map(|path| {
// Note: The `join("")` call ensures that there's a trailing slash
path.join("pages").join("")
})
.ok(),
}
}