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

Unified Diff: chrome/browser/first_run/upgrade_util_win.cc

Issue 1862203004: Set the working directory on relaunch (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/upgrade_util_win.cc
diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc
index 9d5402a39dc7028237068bdd7dfb642a194944f8..91b35e9e5b8be4be8b63ad240d5ed92b8cb89640 100644
--- a/chrome/browser/first_run/upgrade_util_win.cc
+++ b/chrome/browser/first_run/upgrade_util_win.cc
@@ -93,8 +93,11 @@ bool RelaunchChromeBrowser(const base::CommandLine& command_line) {
chrome_exe_command_line.SetProgram(
chrome_exe.DirName().Append(installer::kChromeExe));
- return base::LaunchProcess(chrome_exe_command_line, base::LaunchOptions())
- .IsValid();
+ // Set the working directory to the exe's directory. This avoids a handle to
+ // the version directory being kept open in the relaunched child process.
+ base::LaunchOptions launch_options;
+ launch_options.current_directory = chrome_exe.DirName();
+ return base::LaunchProcess(chrome_exe_command_line, launch_options).IsValid();
}
bool IsUpdatePendingRestart() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698