Chromium Code Reviews| 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(); |