mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-27 17:55:42 -04:00
Merge pull request #923 from mntone/issue-crashlog
UI: Fix creation of crash log with non-english paths
This commit is contained in:
+9
-1
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user