mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: convert wstring to string on windows in node_bindings (#15268)
This commit is contained in:
committed by
John Kleinschmidt
parent
e113ec78ec
commit
57153ead89
@@ -227,7 +227,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)
|
||||
|
||||
Reference in New Issue
Block a user