tests: add httpcommon tests and add new file_handler methods (#2712)

Co-authored-by: Mariotaku <mariotaku.lee@gmail.com>
This commit is contained in:
ReenigneArcher 2024-06-17 14:03:42 -04:00 committed by GitHub
commit 334267807f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 144 additions and 6 deletions

View file

@ -501,9 +501,7 @@ namespace confighttp {
auto url = inputTree.get("url", "");
const std::string coverdir = platf::appdata().string() + "/covers/";
if (!boost::filesystem::exists(coverdir)) {
boost::filesystem::create_directories(coverdir);
}
file_handler::make_directory(coverdir);
std::basic_string path = coverdir + http::url_escape(key) + ".png";
if (!url.empty()) {