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:
parent
4f85b9edfb
commit
427c2754e9
2 changed files with 8 additions and 1 deletions
|
@ -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
3
file.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue