diff options
author | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-28 05:53:56 +0000 |
---|---|---|
committer | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-28 05:53:56 +0000 |
commit | e48c3c765ab86d968c676635ef3e5545df6f4320 (patch) | |
tree | 6cb8e2e8176518eae1fc7b00216df2d93aa614c9 /chrome/installer/setup | |
parent | 16a8b7ffd53731ba38da4b5e5c833a521782175e (diff) | |
download | chromium_src-e48c3c765ab86d968c676635ef3e5545df6f4320.zip chromium_src-e48c3c765ab86d968c676635ef3e5545df6f4320.tar.gz chromium_src-e48c3c765ab86d968c676635ef3e5545df6f4320.tar.bz2 |
Copy instead of moving the archive if not running from temp.
R=grt@chromium.org
BUG=171779
Review URL: https://chromiumcodereview.appspot.com/12051069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179105 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup')
-rw-r--r-- | chrome/installer/setup/install_worker.cc | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc index 7d774e2..81173a0 100644 --- a/chrome/installer/setup/install_worker.cc +++ b/chrome/installer/setup/install_worker.cc @@ -190,22 +190,21 @@ void AddInstallerCopyTasks(const InstallerState& installer_state, // %LOCALAPPDATA% otherwise), there is no need to do this for the archive. // Setup.exe, on the other hand, is created elsewhere so it must always be // copied. -#if !defined(COMPONENT_BUILD) - install_list->AddMoveTreeWorkItem(archive_path.value(), - archive_dst.value(), - temp_path.value(), - WorkItem::ALWAYS_MOVE); -#else // COMPONENT_BUILD - // The archive is usually extracted in |temp_path| in which case we want - // to move it as mentioned above; however in the component build, - // setup.exe uses chrome.7z directly from the build output, moving it - // means that setup.exe cannot be run again without regenerating the - // archive, so copy it instead in this case to save developer time. - install_list->AddCopyTreeWorkItem(archive_path.value(), - archive_dst.value(), - temp_path.value(), - WorkItem::ALWAYS); -#endif // COMPONENT_BUILD + if (temp_path.IsParent(archive_path)) { + install_list->AddMoveTreeWorkItem(archive_path.value(), + archive_dst.value(), + temp_path.value(), + WorkItem::ALWAYS_MOVE); + } else { + // This may occur when setup is run out of an existing installation + // directory. For example, when quick-enabling user-level App Launcher + // from system-level Binaries. We can't (and don't want to) remove the + // system-level archive. + install_list->AddCopyTreeWorkItem(archive_path.value(), + archive_dst.value(), + temp_path.value(), + WorkItem::ALWAYS); + } } } } |