diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-28 15:30:03 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-28 15:30:03 +0000 |
| commit | 9d3168648c7cbc211c6489126e1bd4cdbe588363 (patch) | |
| tree | a39fc8e85fcd685cbde0b246e972b7bf37f6a944 | |
| parent | 5b0899ffaeb43b74668ad786483d454708d31f3b (diff) | |
| download | ruby-9d3168648c7cbc211c6489126e1bd4cdbe588363.tar.gz ruby-9d3168648c7cbc211c6489126e1bd4cdbe588363.tar.xz ruby-9d3168648c7cbc211c6489126e1bd4cdbe588363.zip | |
* win32/win32.c (rb_w32_open): need to seek to the end of the file when
O_APPEND is specified.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | win32/win32.c | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Oct 29 00:29:46 2008 NAKAMURA Usaku <usa@ruby-lang.org> + + * win32/win32.c (rb_w32_open): need to seek to the end of the file when + O_APPEND is specified. + Tue Oct 28 23:03:46 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp> * test/ruby/test_proc.rb: filled all patterns for testing diff --git a/win32/win32.c b/win32/win32.c index 13642afa2..b70a6d7fa 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -4129,8 +4129,10 @@ rb_w32_open(const char *file, int oflag, ...) fd = -1; goto quit; } - if (!(flags & (FDEV | FPIPE)) && (oflag & O_APPEND)) + if (!(flags & (FDEV | FPIPE)) && (oflag & O_APPEND)) { flags |= FAPPEND; + SetFilePointer(h, 0, NULL, FILE_END); + } _set_osfhnd(fd, (long)h); _osfile(fd) = flags | FOPEN; |
