| Index: base/file_util_win.cc
|
| diff --git a/base/file_util_win.cc b/base/file_util_win.cc
|
| index 964302adce55b0cafab153460614e5bc2a81a1f3..66ed7283c1baca878466a263e248c4e80a8c68a0 100644
|
| --- a/base/file_util_win.cc
|
| +++ b/base/file_util_win.cc
|
| @@ -148,8 +148,11 @@ bool MoveUnsafe(const FilePath& from_path, const FilePath& to_path) {
|
| return ret;
|
| }
|
|
|
| -bool ReplaceFile(const FilePath& from_path, const FilePath& to_path) {
|
| +bool ReplaceFile(const FilePath& from_path, const FilePath& to_path,
|
| + base::PlatformFileError* error) {
|
| base::ThreadRestrictions::AssertIOAllowed();
|
| + if (error)
|
| + *error = base::PLATFORM_FILE_OK;
|
| // Try a simple move first. It will only succeed when |to_path| doesn't
|
| // already exist.
|
| if (::MoveFile(from_path.value().c_str(), to_path.value().c_str()))
|
| @@ -162,6 +165,8 @@ bool ReplaceFile(const FilePath& from_path, const FilePath& to_path) {
|
| REPLACEFILE_IGNORE_MERGE_ERRORS, NULL, NULL)) {
|
| return true;
|
| }
|
| + if (error)
|
| + *error = base::LastErrorToPlatformFileError(GetLastError());
|
| return false;
|
| }
|
|
|
|
|