From 02460eeab5722da83aca8ebcf04885de6cd2a8ab Mon Sep 17 00:00:00 2001 From: "iyengar@google.com" Date: Tue, 16 Sep 2008 22:44:14 +0000 Subject: This fixes http://code.google.com/p/chromium/issues/detail?id=2321, which was an issue with Adobe reader retaining an open handle to the chrome application folder causing issues with subsequent installs. This was because we did not specify the current directory in the ShellExecute call. This resulted in the chrome application folder becoming the current directory and hence the issue. Bug=2321 Review URL: http://codereview.chromium.org/3092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2287 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/win_util.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'chrome') diff --git a/chrome/common/win_util.cc b/chrome/common/win_util.cc index 9655478..f664cfb 100644 --- a/chrome/common/win_util.cc +++ b/chrome/common/win_util.cc @@ -242,8 +242,10 @@ void ShowItemInFolder(const std::wstring& full_path) { // Open an item via a shell execute command. Error code checking and casting // explanation: http://msdn2.microsoft.com/en-us/library/ms647732.aspx bool OpenItemViaShell(const std::wstring& full_path, bool ask_for_app) { - HINSTANCE h = ::ShellExecuteW(NULL, NULL, full_path.c_str(), NULL, - NULL, SW_SHOWNORMAL); + HINSTANCE h = ::ShellExecuteW( + NULL, NULL, full_path.c_str(), NULL, + file_util::GetDirectoryFromPath(full_path).c_str(), SW_SHOWNORMAL); + LONG_PTR error = reinterpret_cast(h); if (error > 32) return true; -- cgit v1.1