From: Cheng Zhao Date: Fri, 27 Feb 2015 20:21:19 +0000 (-0800) Subject: win: Fix calling FILE_PATH_LITERAL for variable, fixes #1143 X-Git-Tag: v0.21.3~6 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=e98953a5a563648a69b6cb8535d1f27febeec887;p=electron.git win: Fix calling FILE_PATH_LITERAL for variable, fixes #1143 --- diff --git a/atom/common/node_bindings.cc b/atom/common/node_bindings.cc index f98aaad8..5efdc0b0 100644 --- a/atom/common/node_bindings.cc +++ b/atom/common/node_bindings.cc @@ -174,11 +174,12 @@ node::Environment* NodeBindings::CreateEnvironment( #endif // Feed node the path to initialization script. - const char* process_type = is_browser_ ? "browser" : "renderer"; + base::FilePath::StringType process_type = is_browser_ ? + FILE_PATH_LITERAL("browser") : FILE_PATH_LITERAL("renderer"); base::FilePath resources_path = GetResourcesPath(command_line, is_browser_); base::FilePath script_path = resources_path.Append(FILE_PATH_LITERAL("atom.asar")) - .Append(FILE_PATH_LITERAL(process_type)) + .Append(process_type) .Append(FILE_PATH_LITERAL("lib")) .Append(FILE_PATH_LITERAL("init.js")); std::string script_path_str = script_path.AsUTF8Unsafe();