diff --git a/modules/paged_article/paged_article.cpp b/modules/paged_article/paged_article.cpp index 7444bdd..5b202d3 100644 --- a/modules/paged_article/paged_article.cpp +++ b/modules/paged_article/paged_article.cpp @@ -68,12 +68,7 @@ void PagedArticle::load() { for (uint32_t i = 0; i < files.size(); ++i) { String file_path = articles_folder; - - if (file_path.size() > 0 && file_path[file_path.size() - 1] != '/') { - file_path += "/"; - } - - file_path += files[i]; + file_path.append_path(files[i]); String fd; @@ -108,7 +103,8 @@ void PagedArticle::load() { if (serve_folder != "") { if (serve_folder_relative) { - file_cache->wwwroot = articles_folder + "/" + serve_folder; + file_cache->wwwroot = articles_folder; + file_cache->wwwroot.append_path(serve_folder); } else { file_cache->wwwroot = serve_folder; } diff --git a/modules/paged_article/paged_articles.cpp b/modules/paged_article/paged_articles.cpp index b5132a6..1fb4ff7 100644 --- a/modules/paged_article/paged_articles.cpp +++ b/modules/paged_article/paged_articles.cpp @@ -34,7 +34,8 @@ void PagedArticles::load() { String np = dir->current_get_path(); String fn = dir->current_get_name(); - String ff = folder + "/" + fn; + String ff = folder; + ff.append_path(fn); PagedArticle *p = new PagedArticle(); String seg = dir->current_get_name();