diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-28 15:27:06 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-28 15:27:06 +0000 |
| commit | 57e9892e8282d6ce90ca3665dc323a7203ae19da (patch) | |
| tree | 6ec0654757415b55808db06d23be2d7ed88fc22e /win32 | |
| parent | 4476f0bab055a84b498de82e11372873e936562e (diff) | |
| download | ruby-57e9892e8282d6ce90ca3665dc323a7203ae19da.tar.gz ruby-57e9892e8282d6ce90ca3665dc323a7203ae19da.tar.xz ruby-57e9892e8282d6ce90ca3665dc323a7203ae19da.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/trunk@20008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
| -rw-r--r-- | win32/win32.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |
