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..c2c00f581c1a769ea2664869c35231a16644fc81 100644 |
| --- a/chrome/installer/util/move_tree_work_item.cc |
| +++ b/chrome/installer/util/move_tree_work_item.cc |
| @@ -43,12 +43,14 @@ bool MoveTreeWorkItem::DoImpl() { |
| // fail if files in dest_path_ are in use. |
| if (base::PathExists(dest_path_)) { |
| // Generate a backup path that can keep the original files under dest_path_. |
| - if (!backup_path_.CreateUniqueTempDirUnderPath(temp_dir_)) { |
| + if (!backup_dir_.CreateUniqueTempDirUnderPath(temp_dir_)) { |
| PLOG(ERROR) << "Failed to get backup path in folder " |
| << temp_dir_.value(); |
| return false; |
| } |
| - base::FilePath backup = backup_path_.path().Append(dest_path_.BaseName()); |
| + backup_path_ = backup_dir_.GetPath(); |
|
gab
2016/09/28 16:31:59
Just like copy_tree_work_item.cc, looks like the o
vabr (Chromium)
2016/09/28 20:06:36
Looking at the test failures in the first patch se
gab
2016/09/28 20:25:25
Right, I think obtaining the variable should be in
vabr (Chromium)
2016/09/28 20:33:11
Good idea, I will do that.
|
| + |
| + base::FilePath backup = backup_path_.Append(dest_path_.BaseName()); |
| if (duplicate_option_ == CHECK_DUPLICATES) { |
| if (installer::IsIdenticalFileHierarchy(source_path_, dest_path_)) { |
| @@ -105,7 +107,7 @@ void MoveTreeWorkItem::RollbackImpl() { |
| << " to " << source_path_.value(); |
| } |
| - base::FilePath backup = backup_path_.path().Append(dest_path_.BaseName()); |
| + base::FilePath backup = backup_path_.Append(dest_path_.BaseName()); |
| if (moved_to_backup_ && !base::Move(backup, dest_path_)) { |
| PLOG(ERROR) << "failed move " << backup.value() |
| << " to " << dest_path_.value(); |