summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/install_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/installer/util/install_util.cc')
-rw-r--r--chrome/installer/util/install_util.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index a3f32d1..1f22cd6 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -124,7 +124,9 @@ bool InstallUtil::IsPerUserInstall(const wchar_t* const exe_path) {
wchar_t program_files_path[MAX_PATH] = {0};
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL,
SHGFP_TYPE_CURRENT, program_files_path))) {
- return !StartsWith(exe_path, program_files_path, false);
+ std::wstring program_files(program_files_path);
+ std::wstring exe_path_truncated(exe_path, program_files.size());
+ return !FilePath::CompareEqualIgnoreCase(program_files, exe_path_truncated);
} else {
NOTREACHED();
}