Chromium Code Reviews| Index: base/file_util_win.cc |
| diff --git a/base/file_util_win.cc b/base/file_util_win.cc |
| index 964302adce55b0cafab153460614e5bc2a81a1f3..d4a18dba38c95ffeca8237bfd3e0b1251bf598a3 100644 |
| --- a/base/file_util_win.cc |
| +++ b/base/file_util_win.cc |
| @@ -148,7 +148,8 @@ 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, |
|
jar (doing other things)
2013/05/07 22:31:32
nit: One arg per line when you wrap args in declar
dgrogan
2013/05/07 22:45:16
Done.
|
| + base::PlatformFileError* error) { |
| base::ThreadRestrictions::AssertIOAllowed(); |
| // Try a simple move first. It will only succeed when |to_path| doesn't |
| // already exist. |
| @@ -162,6 +163,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; |
| } |