Chromium Code Reviews| Index: runtime/bin/file_linux.cc |
| =================================================================== |
| --- runtime/bin/file_linux.cc (revision 3943) |
| +++ runtime/bin/file_linux.cc (working copy) |
| @@ -116,6 +116,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); |
|
Mads Ager (google)
2012/02/07 09:23:27
return NULL instead?
|
| + } |
| return new File(name, new FileHandle(fd)); |
| } |