diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | file.c | 3 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Thu Nov 24 01:22:25 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 20:59:01 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> * ext/tk/lib/tk.rb: add Tk.pkgconfig_list and Tk.pkgconfig_get @@ -683,7 +683,8 @@ w32_io_info(file, st) } else { SafeStringValue(*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; } |