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

Unified Diff: base/files/file_posix.cc

Issue 2404823002: Fix error handling in POSIX version of the base::File::GetLength. (Closed)
Patch Set: Fix error handling in POSIX version of the base::File::GetLength. Created 4 years, 1 month 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 | base/files/memory_mapped_file_posix.cc » ('j') | net/disk_cache/blockfile/mapped_file.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_posix.cc
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc
index a0f2328fe20be9f024c2a3cdc933cc0c6238b8b0..fcd190ac16f7561965f41d8ff3bec1d9ed3602e7 100644
--- a/base/files/file_posix.cc
+++ b/base/files/file_posix.cc
@@ -321,7 +321,7 @@ int64_t File::GetLength() {
stat_wrapper_t file_info;
if (CallFstat(file_.get(), &file_info))
- return false;
+ return -1;
return file_info.st_size;
}
« no previous file with comments | « no previous file | base/files/memory_mapped_file_posix.cc » ('j') | net/disk_cache/blockfile/mapped_file.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698