1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* file.c (w32_io_info): CreateFile failed on Win9x if file was already

opened. (FILE_SHARE_READ was needed, but actually I don't understand
  the flags of CreateFile well...)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2005-11-23 16:32:47 +00:00
parent 4f85b9edfb
commit 427c2754e9
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Thu Nov 24 01:31:44 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* file.c (w32_io_info): CreateFile failed on Win9x if file was already
opened. (FILE_SHARE_READ was needed, but actually I don't understand
the flags of CreateFile well...)
Wed Nov 23 23:52:35 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
* numeric.c (num_div): use floor rather than rb_Integer().

3
file.c
View file

@ -655,7 +655,8 @@ w32_io_info(VALUE *file, BY_HANDLE_FILE_INFORMATION *st)
}
else {
FilePathValue(*file);
f = CreateFile(StringValueCStr(*file), 0, 0, NULL, OPEN_EXISTING,
f = CreateFile(StringValueCStr(*file), 0,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
rb_w32_iswin95() ? 0 : FILE_FLAG_BACKUP_SEMANTICS, NULL);
if (f == INVALID_HANDLE_VALUE) return FALSE;
}