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

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

Issue 2379543002: installer and some misc files: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Fix compilation Created 4 years, 3 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/util/delete_tree_work_item.cc ('k') | chrome/installer/util/shell_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/move_tree_work_item.cc
diff --git a/chrome/installer/util/move_tree_work_item.cc b/chrome/installer/util/move_tree_work_item.cc
index ef682348c636a56dcd19f37c7607bc75f1c19547..b8ebbef9be15b718350f10bf9b4db408738d2892 100644
--- a/chrome/installer/util/move_tree_work_item.cc
+++ b/chrome/installer/util/move_tree_work_item.cc
@@ -48,7 +48,8 @@ bool MoveTreeWorkItem::DoImpl() {
<< temp_dir_.value();
return false;
}
- base::FilePath backup = backup_path_.path().Append(dest_path_.BaseName());
+ base::FilePath backup =
+ backup_path_.GetPath().Append(dest_path_.BaseName());
if (duplicate_option_ == CHECK_DUPLICATES) {
if (installer::IsIdenticalFileHierarchy(source_path_, dest_path_)) {
@@ -105,7 +106,9 @@ void MoveTreeWorkItem::RollbackImpl() {
<< " to " << source_path_.value();
}
- base::FilePath backup = backup_path_.path().Append(dest_path_.BaseName());
+ base::FilePath backup;
+ if (moved_to_backup_ || source_moved_to_backup_)
+ backup = backup_path_.GetPath().Append(dest_path_.BaseName());
gab 2016/09/29 13:36:00 The two ifs below only make sense within this cond
vabr (Chromium) 2016/09/30 07:40:10 Done.
if (moved_to_backup_ && !base::Move(backup, dest_path_)) {
PLOG(ERROR) << "failed move " << backup.value()
<< " to " << dest_path_.value();
« no previous file with comments | « chrome/installer/util/delete_tree_work_item.cc ('k') | chrome/installer/util/shell_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698