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

Unified Diff: runtime/bin/file_win.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
« no previous file with comments | « runtime/bin/file_macos.cc ('k') | tests/standalone/src/FileTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_win.cc
===================================================================
--- runtime/bin/file_win.cc (revision 3943)
+++ runtime/bin/file_win.cc (working copy)
@@ -113,6 +113,12 @@
if (fd < 0) {
return NULL;
}
+ if (((mode & kWrite) != 0) && ((mode & kTruncate) == 0)) {
+ int position = lseek(fd, 0, SEEK_END);
+ if (position < 0) {
+ return NULL;
+ }
+ }
return new File(name, new FileHandle(fd));
}
« no previous file with comments | « runtime/bin/file_macos.cc ('k') | tests/standalone/src/FileTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698