win: Fix calling FILE_PATH_LITERAL for variable, fixes #1143

This commit is contained in:
Cheng Zhao 2015-02-27 12:21:19 -08:00
parent 0c99f3baa6
commit e98953a5a5

View file

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