Index: base/file_util_win.cc |
=================================================================== |
--- base/file_util_win.cc (revision 35459) |
+++ base/file_util_win.cc (working copy) |
@@ -98,6 +98,15 @@ |
return (err == 0 || err == ERROR_FILE_NOT_FOUND); |
} |
+bool DeleteAfterReboot(const FilePath& path) { |
+ if (path.value().length() >= MAX_PATH) |
+ return false; |
+ |
+ return MoveFileEx(path.value().c_str(), NULL, |
+ MOVEFILE_DELAY_UNTIL_REBOOT | |
+ MOVEFILE_REPLACE_EXISTING) != FALSE; |
+} |
+ |
bool Move(const FilePath& from_path, const FilePath& to_path) { |
// NOTE: I suspect we could support longer paths, but that would involve |
// analyzing all our usage of files. |