File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -153,11 +153,15 @@ namespace string_tools
153153
154154 void set_module_name_and_folder (const std::string& path_to_process_)
155155 {
156- boost::filesystem::path path_to_process = path_to_process_ ;
156+ boost::filesystem::path path_to_process;
157157
158158#ifdef _WIN32
159- path_to_process = get_current_module_path ();
160- #endif
159+ // Convert to wide string to avoid codecvt errors with Unicode paths
160+ std::wstring wpath = epee::string_tools::utf8_to_utf16 (get_current_module_path ());
161+ path_to_process = boost::filesystem::path (wpath);
162+ #else
163+ path_to_process = boost::filesystem::path (path_to_process_);
164+ #endif
161165
162166 get_current_module_name () = path_to_process.filename ().string ();
163167 get_current_module_folder () = path_to_process.parent_path ().string ();
You can’t perform that action at this time.
0 commit comments