diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-01-08 05:00:25 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-01-08 05:00:25 +0000 |
commit | a69b9bce318b3d4717b92a8747ecdb4e71585c5d (patch) | |
tree | f12f100a2b4900f3533586fa342cad65713f7855 /file.c | |
parent | a3da8465b4406e01b9b597e0af81dad3f65c5528 (diff) | |
download | ruby-a69b9bce318b3d4717b92a8747ecdb4e71585c5d.tar.gz |
2000-01-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -403,8 +403,8 @@ eaccess(path, mode) if (st.st_mode & mode) return 0; return -1; -#else /* !NT*/ - return 0; +#else /* !NT */ + return access(path, mode); #endif } @@ -1502,6 +1502,9 @@ rb_file_flock(obj, operation) rb_secure(2); GetOpenFile(obj, fptr); + if (fptr->mode & FMODE_WRITABLE) { + fflush(GetWriteFile(fptr)); + } if (flock(fileno(fptr->f), NUM2INT(operation)) < 0) { #ifdef EWOULDBLOCK if (errno == EWOULDBLOCK) { |