diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-15 17:11:51 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-15 17:11:51 +0000 |
commit | 8c013142613b744a668656fe604b2c6987f2cc4c (patch) | |
tree | c74f947213ff685b9d9c9686be15d6fc927e68cb /chrome/installer/setup/install_worker.cc | |
parent | a17a6e9a5c58fce725887612a2d137a56f698e9c (diff) | |
download | chromium_src-8c013142613b744a668656fe604b2c6987f2cc4c.zip chromium_src-8c013142613b744a668656fe604b2c6987f2cc4c.tar.gz chromium_src-8c013142613b744a668656fe604b2c6987f2cc4c.tar.bz2 |
Errors while deleting old version dirs no longer cause them to grow in odd ways.
InstallerState::RemoveOldVersionDirectories now tells its DeleteTreeWorkItem instances to ignore failures. Deleting the old version dirs is a best-effort thing. Should one fail to be deletable on account of a file or directory being in use (other than the key files: chrome.dll, npchrome_frame.dll, and chrome_frame_helper.exe), the installer will no go on its merry way rather than trying to un-do the delete (which is error-prone to say the least).
Also, during installation, don't make success of the install contingent on being able to delete old_chrome.exe. Basically for the same reasons. If we can't delete it because it's in use by someone/thing, just leave it there. It'll be cleaned up on a later install, or when new_chrome.exe is later swapped into place. This may reduce our INSTALL_FAILED errors.
BUG=100218
TEST=see bug
Review URL: http://codereview.chromium.org/8299008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105671 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup/install_worker.cc')
-rw-r--r-- | chrome/installer/setup/install_worker.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc index 4bcb437..8fe4818 100644 --- a/chrome/installer/setup/install_worker.cc +++ b/chrome/installer/setup/install_worker.cc @@ -754,9 +754,10 @@ void AddInstallWorkItems(const InstallationState& original_state, target_path.Append(installer::kDictionaries).value(), temp_path.value(), WorkItem::IF_NOT_PRESENT); - // Delete any old_chrome.exe if present. + // Delete any old_chrome.exe if present (ignore failure if it's in use). install_list->AddDeleteTreeWorkItem( - target_path.Append(installer::kChromeOldExe), temp_path); + target_path.Append(installer::kChromeOldExe), temp_path) + ->set_ignore_failure(true); // Copy installer in install directory and // add shortcut in Control Panel->Add/Remove Programs. |