Skip to content

Commit

Permalink
fix: convert wstring to string on windows in node_bindings (#15266)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound committed Oct 19, 2018
1 parent 37f2113 commit 8bc0c34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions atom/common/node_bindings.cc
Expand Up @@ -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)
Expand Down

0 comments on commit 8bc0c34

Please sign in to comment.