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

Unified Diff: split_file_writer.cc

Issue 3495002: [update_engine] Fix file creation mask to be 0600 (Closed) Base URL: http://git.chromium.org/git/update_engine.git
Patch Set: Created 10 years, 3 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
« main.cc ('K') | « split_file_writer.h ('k') | utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: split_file_writer.cc
diff --git a/split_file_writer.cc b/split_file_writer.cc
index 690d4e3f02024771b51e7809e1d9989b21c99898..dd211c8b145012008285c35730ef872babe0d741 100644
--- a/split_file_writer.cc
+++ b/split_file_writer.cc
@@ -43,7 +43,7 @@ ssize_t PerformWrite(FileWriter* writer, const void* bytes, size_t count) {
ssize_t SplitFileWriter::Write(const void* bytes, size_t count) {
const size_t original_count = count;
-
+
// This first block is trying to read the first sizeof(uint64_t)
// bytes, which are the number of bytes that should be written
// to the first FileWriter.
@@ -78,11 +78,11 @@ ssize_t SplitFileWriter::Write(const void* bytes, size_t count) {
first_length_ -
(bytes_received_ - static_cast<off_t>(sizeof(uint64_t))),
static_cast<off_t>(count));
-
+
int rc = PerformWrite(first_file_writer_, bytes, bytes_to_write);
if (rc != static_cast<int>(bytes_to_write))
return rc;
-
+
bytes_received_ += bytes_to_write;
count -= bytes_to_write;
bytes = static_cast<const void*>(
« main.cc ('K') | « split_file_writer.h ('k') | utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698