Chromium Code Reviews| 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)); |
| } |