Index: chrome/installer/util/install_util.cc |
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc |
index d98a30b5037145aefa3fcc425c4044ab3cbb8e20..659ff54b83462b89aaedeaff96bb2fc77fcf2005 100644 |
--- a/chrome/installer/util/install_util.cc |
+++ b/chrome/installer/util/install_util.cc |
@@ -384,7 +384,15 @@ bool InstallUtil::GetSentinelFilePath(const FilePath::CharType* file, |
return false; |
if (IsPerUserInstall(exe_path.value().c_str())) { |
- *path = exe_path; |
+ // On user installs, the sentinel file path is by chrome.exe. DIR_EXE |
+ // however is the directory of the current exe which could be another |
+ // executable in the install hierarchy (e.g., setup.exe). |
+ FilePath user_level_install_path( |
grt (UTC plus 2)
2013/01/03 15:41:27
instead of requiring that the default install path
gab
2013/01/03 17:11:14
Fine, I was trying to avoid the assumption about b
|
+ installer::GetChromeInstallPath(false, dist)); |
+ if (user_level_install_path.IsParent(exe_path)) |
+ *path = user_level_install_path; |
+ else |
+ *path = exe_path; |
} else { |
std::vector<FilePath> user_data_dir_paths; |
installer::GetChromeUserDataPaths(dist, &user_data_dir_paths); |