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

Unified Diff: components/filesystem/directory_impl.cc

Issue 2604843002: Fix crash in DirectoryImpl::Flush() (Closed)
Patch Set: Created 4 years 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 | components/filesystem/directory_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/filesystem/directory_impl.cc
diff --git a/components/filesystem/directory_impl.cc b/components/filesystem/directory_impl.cc
index 5174477a3fce3e85703e369b588bd6461af2a1a7..8577078a0da2771108e1ba83a084a36ec940e7b3 100644
--- a/components/filesystem/directory_impl.cc
+++ b/components/filesystem/directory_impl.cc
@@ -224,7 +224,8 @@ void DirectoryImpl::IsWritable(const std::string& raw_path,
}
void DirectoryImpl::Flush(const FlushCallback& callback) {
- base::File file(directory_path_, base::File::FLAG_READ);
+ base::File file(directory_path_,
+ base::File::FLAG_OPEN | base::File::FLAG_READ);
if (!file.IsValid()) {
callback.Run(GetError(file));
return;
« no previous file with comments | « no previous file | components/filesystem/directory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698