feat.肉鸽新协议画饼,完成了读取配置部分的内容

This commit is contained in:
MistEO
2022-04-03 22:56:19 +08:00
parent 660135f93f
commit 57b21b06fc
15 changed files with 396 additions and 9 deletions

View File

@@ -9,11 +9,18 @@ bool asst::AbstractConfiger::load(const std::string& filename)
{
LogTraceFunction;
if (!std::filesystem::exists(filename)) {
#ifdef WIN32
std::string cvt_filename = utils::utf8_to_gbk(filename);
#else
std::string cvt_filename = filename;
#endif
Log.info("Load:", cvt_filename);
if (!std::filesystem::exists(cvt_filename)) {
return false;
}
std::string content = utils::load_file_without_bom(filename);
std::string content = utils::load_file_without_bom(cvt_filename);
auto&& ret = json::parser::parse(content);
if (!ret) {