mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-15 07:44:10 +00:00
UI: Fix creation of crash log with non-english paths
This commit is contained in:
parent
69dbb2c0bf
commit
2ea7e3b344
|
@ -1414,8 +1414,16 @@ static void main_crash_handler(const char *format, va_list args, void *param)
|
|||
BPtr<char> path(GetConfigPathPtr(name.c_str()));
|
||||
|
||||
fstream file;
|
||||
file.open(path, ios_base::in | ios_base::out | ios_base::trunc |
|
||||
|
||||
#ifdef _WIN32
|
||||
BPtr<wchar_t> wpath;
|
||||
os_utf8_to_wcs_ptr(path, 0, &wpath);
|
||||
file.open(wpath, ios_base::in | ios_base::out | ios_base::trunc |
|
||||
ios_base::binary);
|
||||
#else
|
||||
file.open(path, ios_base::in | ios_base::out | ios_base::trunc |
|
||||
ios_base::binary);
|
||||
#endif
|
||||
file << text;
|
||||
file.close();
|
||||
|
||||
|
|
Loading…
Reference in a new issue