Use the append_path helpers in 2 places.

This commit is contained in:
Relintai 2022-02-05 14:53:59 +01:00
parent 4ca0d7032a
commit 25e4e929a6
2 changed files with 5 additions and 8 deletions

View File

@ -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;
}

View File

@ -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();