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

Unified Diff: runtime/bin/file_macos.cc

Issue 9346015: Change file opening operation to set position at the end of the file when FileMode.APPEND is used. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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
Index: runtime/bin/file_macos.cc
===================================================================
--- runtime/bin/file_macos.cc (revision 3943)
+++ runtime/bin/file_macos.cc (working copy)
@@ -117,6 +117,10 @@
if (fd < 0) {
return NULL;
}
+ if (((mode & kWrite) != 0) && ((mode & kTruncate) == 0)) {
+ int position = TEMP_FAILURE_RETRY(lseek(fd, 0, SEEK_END));
+ ASSERT(position >= 0);
+ }
return new File(name, new FileHandle(fd));
}

Powered by Google App Engine
This is Rietveld 408576698