Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3962)

Unified Diff: chrome/installer/util/delete_tree_work_item.cc

Issue 6683005: Delete chrome.7z archives in the current installation when doing an upgrade t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/delete_tree_work_item.cc
===================================================================
--- chrome/installer/util/delete_tree_work_item.cc (revision 77927)
+++ chrome/installer/util/delete_tree_work_item.cc (working copy)
@@ -104,19 +104,24 @@
// Now that we've taken care of the key files, take care of the rest.
if (!root_path_.empty() && file_util::PathExists(root_path_)) {
- if (!backup_path_.CreateUniqueTempDirUnderPath(temp_path_)) {
- PLOG(ERROR) << "Failed to get backup path in folder "
- << temp_path_.value();
- return ignore_failure_;
- } else {
- FilePath backup = backup_path_.path().Append(root_path_.BaseName());
- if (!file_util::CopyDirectory(root_path_, backup, true) ||
- !file_util::Delete(root_path_, true)) {
- LOG(ERROR) << "can not delete " << root_path_.value()
- << " OR copy it to backup path " << backup.value();
- return ignore_failure_;
+ if (!ignore_failure_) {
+ if (!backup_path_.CreateUniqueTempDirUnderPath(temp_path_)) {
+ PLOG(ERROR) << "Failed to get backup path in folder "
+ << temp_path_.value();
+ return false;
+ } else {
+ FilePath backup = backup_path_.path().Append(root_path_.BaseName());
+ if (!file_util::CopyDirectory(root_path_, backup, true)) {
+ LOG(ERROR) << "can not copy " << root_path_.value()
+ << " to backup path " << backup.value();
+ return false;
+ }
}
}
+ if (!file_util::Delete(root_path_, true)) {
+ LOG(ERROR) << "can not delete " << root_path_.value();
+ return ignore_failure_;
+ }
}
return true;
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698