fix: convert wstring to string on windows in node_bindings (#15268)

This commit is contained in:
trop[bot]
2018-10-19 13:37:25 -04:00
committed by John Kleinschmidt
parent e113ec78ec
commit 57153ead89

View File

@@ -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)