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

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

Issue 164537: Renames the function CreateTemporaryFilename to CreateTemporaryFile and track... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: CommandLine fix Created 11 years, 4 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/master_preferences_unittest.cc ('k') | chrome/renderer/render_view_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
===================================================================
--- chrome/installer/util/move_tree_work_item.cc (revision 23574)
+++ chrome/installer/util/move_tree_work_item.cc (working copy)
@@ -30,20 +30,26 @@
return false;
}
+ FilePath backup_path;
+
// If dest_path_ exists, move destination to a backup path.
if (file_util::PathExists(dest_path_)) {
// Generate a backup path that can keep the original files under dest_path_.
- if (!file_util::CreateTemporaryFileNameInDir(temp_dir_, &backup_path_)) {
+ if (!file_util::CreateTemporaryFileInDir(FilePath(temp_dir_),
+ &backup_path)) {
LOG(ERROR) << "Failed to get backup path in folder " << temp_dir_;
return false;
}
+ backup_path_ = backup_path.value();
+
if (file_util::Move(dest_path_, backup_path_)) {
moved_to_backup_ = true;
LOG(INFO) << "Moved destination " << dest_path_
<< " to backup path " << backup_path_;
} else {
- LOG(ERROR) << "failed moving " << dest_path_ << " to " << backup_path_;
+ LOG(ERROR) << "failed moving " << dest_path_
+ << " to " << backup_path_;
return false;
}
}
Property changes on: chrome\installer\util\move_tree_work_item.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/installer/util/master_preferences_unittest.cc ('k') | chrome/renderer/render_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698