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

Unified Diff: runtime/bin/gen_snapshot.cc

Issue 9034005: Change the behavior of open on files to not truncate by default (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comment.s Created 8 years, 12 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 | « runtime/bin/file_win.cc ('k') | runtime/bin/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/gen_snapshot.cc
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index 8f14be70dc0848764a4c3402c1e2ba0ed1a99b17..c66fe33ea5b97ce568c09c79518283aa6ae3b35c 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -105,8 +105,7 @@ static int ParseArguments(int argc,
static void WriteSnapshotFile(const uint8_t* buffer, const intptr_t size) {
- const bool kWritable = true;
- File* file = File::Open(snapshot_filename, kWritable);
+ File* file = File::Open(snapshot_filename, File::kWriteTruncate);
ASSERT(file != NULL);
for (intptr_t i = 0; i < size; i++) {
file->WriteByte(buffer[i]);
« no previous file with comments | « runtime/bin/file_win.cc ('k') | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698