attempt at correct utf8 decoding for toml config file path
This commit is contained in:
parent
01c2d65f07
commit
b778fbaad1
|
@ -22,6 +22,7 @@
|
|||
#include <inttypes.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
#include <regex>
|
||||
#include "toml/toml.hpp"
|
||||
|
||||
|
@ -741,7 +742,7 @@ bool Load()
|
|||
|
||||
try
|
||||
{
|
||||
RootTable = toml::parse(cfgpath);
|
||||
RootTable = toml::parse(std::filesystem::u8path(cfgpath));
|
||||
}
|
||||
catch (toml::syntax_error& err)
|
||||
{
|
||||
|
@ -758,7 +759,7 @@ void Save()
|
|||
return;
|
||||
|
||||
std::ofstream file;
|
||||
file.open(cfgpath, std::ofstream::out | std::ofstream::trunc);
|
||||
file.open(std::filesystem::u8path(cfgpath), std::ofstream::out | std::ofstream::trunc);
|
||||
file << RootTable;
|
||||
file.close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue