Ensure usernames with non-latin characters correctly reopens stderr

against a local file.
This commit is contained in:
casey langen 2022-12-04 19:54:10 -08:00
parent 0787bdd689
commit f939db9592

View File

@ -104,7 +104,11 @@ int main(int argc, char* argv[]) {
#endif
std::string errorFn = core::GetDataDirectory() + "stderr.txt";
#ifdef WIN32
_wfreopen(u8to16(errorFn).c_str(), L"w", stderr);
#else
freopen(errorFn.c_str(), "w", stderr);
#endif
auto prefs = Preferences::ForComponent(core::prefs::components::Settings);