summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--file.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 53f4743d13..d1d650cf8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/file.c b/file.c
index 8aa4264161..dd34478177 100644
--- a/file.c
+++ b/file.c
@@ -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;
}