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

Unified Diff: base/file_util.cc

Issue 254333002: Make base::ReadFileToString() return false on I/O error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix EXPECT_EQ() parameter order. Created 6 years, 8 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 | « base/file_util.h ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.cc
diff --git a/base/file_util.cc b/base/file_util.cc
index c1bf50abc45f720bca415d1bc56d5fb9bf35abda..d11cd15a2e0032d587329ab0399682c25b2195f4 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -157,6 +157,7 @@ bool ReadFileToString(const FilePath& path,
size += len;
}
+ read_status = read_status && !ferror(file);
CloseFile(file);
return read_status;
« no previous file with comments | « base/file_util.h ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698