summaryrefslogtreecommitdiffstats
path: root/base/platform_file_win.cc
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-15 00:37:34 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-15 00:37:34 +0000
commitfd55c28d08f5daef2938cc8ec956849fa80ffcbb (patch)
treeb36eec5e70c97649b570ef6395549c043b1ad3fd /base/platform_file_win.cc
parent1a47d7ea5a641b185283228692c2767a69f09e1a (diff)
downloadchromium_src-fd55c28d08f5daef2938cc8ec956849fa80ffcbb.zip
chromium_src-fd55c28d08f5daef2938cc8ec956849fa80ffcbb.tar.gz
chromium_src-fd55c28d08f5daef2938cc8ec956849fa80ffcbb.tar.bz2
Rename FileUtilProxy::Create to EnsureFileExists
per follow-up discussion on http://codereview.chromium.org/3717001/show Rename FileUtilProxy::Create to EnsureFileExists to make it clear that it doesn't open the file (or doesn't leave a file handle opened). Also fixes CreatePlatformFile to set |created| correctly when PLATFORM_FILE_CREATE flag is given (I think this is the correct behavior). BUG=none TEST=FileSystemOperationTest.* Review URL: http://codereview.chromium.org/3743004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62683 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/platform_file_win.cc')
-rw-r--r--base/platform_file_win.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/platform_file_win.cc b/base/platform_file_win.cc
index 63dfef9..3aa02e8 100644
--- a/base/platform_file_win.cc
+++ b/base/platform_file_win.cc
@@ -68,9 +68,9 @@ PlatformFile CreatePlatformFile(const FilePath& name,
disposition, create_flags, NULL);
if (created && (INVALID_HANDLE_VALUE != file)) {
- if (flags & PLATFORM_FILE_OPEN_ALWAYS)
+ if (flags & (PLATFORM_FILE_OPEN_ALWAYS))
*created = (ERROR_ALREADY_EXISTS != GetLastError());
- else if (flags & PLATFORM_FILE_CREATE_ALWAYS)
+ else if (flags & (PLATFORM_FILE_CREATE_ALWAYS | PLATFORM_FILE_CREATE))
*created = true;
}