diff options
-rw-r--r-- | net/disk_cache/backend_impl.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 58d75ad..5491268 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -854,10 +854,14 @@ bool BackendImpl::CreateExternalFile(Addr* address) { base::PLATFORM_FILE_WRITE | base::PLATFORM_FILE_CREATE | base::PLATFORM_FILE_EXCLUSIVE_WRITE; + base::PlatformFileError error; scoped_refptr<disk_cache::File> file(new disk_cache::File( - base::CreatePlatformFile(name, flags, NULL, NULL))); - if (!file->IsValid()) + base::CreatePlatformFile(name, flags, NULL, &error))); + if (!file->IsValid()) { + if (error != base::PLATFORM_FILE_ERROR_EXISTS) + return false; continue; + } success = true; break; |