diff options
| author | tobtoht <tob@featherwallet.org> | 2025-06-14 18:59:23 +0000 |
|---|---|---|
| committer | tobtoht <tob@featherwallet.org> | 2025-06-14 18:59:23 +0000 |
| commit | b01fb1801222ac3006b91d2184e12c32080ebfce (patch) | |
| tree | 21b32190e774ea7cb4e062159fb8e7fe97f79610 /contrib | |
| parent | 3c644537b70bb4a5575ee41b0ea0e37724b18871 (diff) | |
| parent | f968150849694e4476dc0379e1f7c0eb73f69e3d (diff) | |
| download | monzero-core-b01fb1801222ac3006b91d2184e12c32080ebfce.tar.gz monzero-core-b01fb1801222ac3006b91d2184e12c32080ebfce.tar.xz monzero-core-b01fb1801222ac3006b91d2184e12c32080ebfce.zip | |
Merge pull request #9909
f968150 epee: fix string_tools on Windows (0xFFFC0000)
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/epee/src/string_tools.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/epee/src/string_tools.cpp b/contrib/epee/src/string_tools.cpp index 081cb9464..224cbe3b2 100644 --- a/contrib/epee/src/string_tools.cpp +++ b/contrib/epee/src/string_tools.cpp @@ -163,11 +163,15 @@ namespace string_tools void set_module_name_and_folder(const std::string& path_to_process_) { - boost::filesystem::path path_to_process = path_to_process_; + boost::filesystem::path path_to_process; #ifdef _WIN32 - path_to_process = get_current_module_path(); -#endif + // Convert to wide string to avoid codecvt errors with Unicode paths + std::wstring wpath = epee::string_tools::utf8_to_utf16(get_current_module_path()); + path_to_process = boost::filesystem::path(wpath); +#else + path_to_process = boost::filesystem::path(path_to_process_); +#endif get_current_module_name() = path_to_process.filename().string(); get_current_module_folder() = path_to_process.parent_path().string(); |
