Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4379)

Unified Diff: chrome/browser/extensions/api/messaging/native_process_launcher_win.cc

Issue 1809383004: Set current directory when launching Native Messaging processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc b/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
index 6ae37b3199d00fefc9dd0efb8698eeb9659e48ba..be44395800ed745404d251aaeb3785121bcf26a1 100644
--- a/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
+++ b/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
@@ -146,12 +146,12 @@ bool NativeProcessLauncher::LaunchNativeProcess(
base::string16 command_line_string = command_line.GetCommandLineString();
base::string16 command = base::StringPrintf(
- L"%ls /c %ls < %ls > %ls",
- comspec.get(), command_line_string.c_str(),
+ L"%ls /c %ls < %ls > %ls", comspec.get(), command_line_string.c_str(),
in_pipe_name.c_str(), out_pipe_name.c_str());
base::LaunchOptions options;
options.start_hidden = true;
+ options.current_directory = command_line.GetProgram().DirName();
base::Process cmd_process = base::LaunchProcess(command.c_str(), options);
if (!cmd_process.IsValid()) {
LOG(ERROR) << "Error launching process "

Powered by Google App Engine
This is Rietveld 408576698