diff options
author | iyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-16 22:44:14 +0000 |
---|---|---|
committer | iyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-16 22:44:14 +0000 |
commit | 02460eeab5722da83aca8ebcf04885de6cd2a8ab (patch) | |
tree | a2d7f4f02d1f635f3924a4256acffaaa683b9049 /chrome | |
parent | 5fe2c27391b3ca2f2864a0a4f6bd957d4347f95c (diff) | |
download | chromium_src-02460eeab5722da83aca8ebcf04885de6cd2a8ab.zip chromium_src-02460eeab5722da83aca8ebcf04885de6cd2a8ab.tar.gz chromium_src-02460eeab5722da83aca8ebcf04885de6cd2a8ab.tar.bz2 |
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
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/win_util.cc | 6 |
1 files changed, 4 insertions, 2 deletions
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<LONG_PTR>(h); if (error > 32) return true; |