diff options
author | mmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-09 22:35:16 +0000 |
---|---|---|
committer | mmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-09 22:35:16 +0000 |
commit | 81569624c8daa060aaab5894df4f834e102c5c95 (patch) | |
tree | 297fb29de8018b98a53590f20c491868187ebe69 /base/file_util_win.cc | |
parent | f9987b49140ea45f9f597e67dd85c2428a8cb242 (diff) | |
download | chromium_src-81569624c8daa060aaab5894df4f834e102c5c95.zip chromium_src-81569624c8daa060aaab5894df4f834e102c5c95.tar.gz chromium_src-81569624c8daa060aaab5894df4f834e102c5c95.tar.bz2 |
Make CreateDirectory consistent on Win and Posix when directory exists.
Review URL: http://codereview.chromium.org/1681
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1941 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_win.cc')
-rw-r--r-- | base/file_util_win.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc index 9c9a4e4..f5e39fa 100644 --- a/base/file_util_win.cc +++ b/base/file_util_win.cc @@ -419,6 +419,8 @@ bool CreateNewTempDirectory(const std::wstring& prefix, } bool CreateDirectory(const std::wstring& full_path) { + if (PathExists(full_path)) + return true; int err = SHCreateDirectoryEx(NULL, full_path.c_str(), NULL); return err == ERROR_SUCCESS; } @@ -643,4 +645,3 @@ std::wstring FileEnumerator::Next() { } } // namespace file_util - |