summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-23 16:32:47 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-23 16:32:47 +0000
commit4126b8742f66e839279cfaec0e2e6d6f9acb39ab (patch)
tree142a8cf0b2a32d339e7229ab89513179bc136744 /file.c
parentd062ab90e1d83bd53e7801ab9b7be82121bc628e (diff)
* 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/branches/ruby_1_8@9604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/file.c b/file.c
index 8aa4264..dd34478 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;
}