fix: convert wstring to string on windows in node_bindings (#15266)
This commit is contained in:
parent
37f2113032
commit
8bc0c343fa
1 changed files with 4 additions and 0 deletions
|
@ -228,7 +228,11 @@ void NodeBindings::Initialize() {
|
|||
if (env->HasVar("NODE_OPTIONS")) {
|
||||
base::FilePath exe_path;
|
||||
base::PathService::Get(base::FILE_EXE, &exe_path);
|
||||
#if defined(OS_WIN)
|
||||
std::string path = base::UTF16ToUTF8(exe_path.value());
|
||||
#else
|
||||
std::string path = exe_path.value();
|
||||
#endif
|
||||
std::transform(path.begin(), path.end(), path.begin(), ::tolower);
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
|
Loading…
Reference in a new issue