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

Unified Diff: base/file_util_win.cc

Issue 18830: FileUtilTest.Contains failed on Vista Home 64 (and wine)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_win.cc
===================================================================
--- base/file_util_win.cc (revision 8722)
+++ base/file_util_win.cc (working copy)
@@ -88,7 +88,10 @@
file_operation.fFlags = FOF_NOERRORUI | FOF_SILENT | FOF_NOCONFIRMATION;
if (!recursive)
file_operation.fFlags |= FOF_NORECURSION | FOF_FILESONLY;
- return (SHFileOperation(&file_operation) == 0);
+ int err = SHFileOperation(&file_operation);
+ // Some versions of Windows return ERROR_FILE_NOT_FOUND when
+ // deleting an empty directory.
+ return (err == 0 || err == ERROR_FILE_NOT_FOUND);
}
bool Move(const FilePath& from_path, const FilePath& to_path) {
@@ -403,7 +406,7 @@
return true;
}
- return false;
+ return false;
}
bool CreateTemporaryFileNameInDir(const std::wstring& dir,
@@ -566,8 +569,8 @@
FOF_NOCONFIRMMKDIR | FOF_NOCOPYSECURITYATTRIBS;
if (0 != SHFileOperation(&move_info))
- return false;
-
+ return false;
+
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698