aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java')
-rw-r--r--libjava/java/io/natFileDescriptorWin32.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/libjava/java/io/natFileDescriptorWin32.cc b/libjava/java/io/natFileDescriptorWin32.cc
index bc9cbc8..f72e39c 100644
--- a/libjava/java/io/natFileDescriptorWin32.cc
+++ b/libjava/java/io/natFileDescriptorWin32.cc
@@ -85,7 +85,6 @@ java::io::FileDescriptor::open (jstring path, jint jflags) {
HANDLE handle = NULL;
DWORD access = 0;
- DWORD share = FILE_SHARE_READ;
DWORD create = OPEN_EXISTING;
char buf[MAX_PATH] = "";
@@ -97,7 +96,6 @@ java::io::FileDescriptor::open (jstring path, jint jflags) {
if ((jflags & READ) && (jflags & WRITE))
{
access = GENERIC_READ | GENERIC_WRITE;
- share = 0;
if (jflags & APPEND)
create = OPEN_ALWAYS;
else
@@ -108,14 +106,13 @@ java::io::FileDescriptor::open (jstring path, jint jflags) {
else
{
access = GENERIC_WRITE;
- share = 0;
if (jflags & APPEND)
create = OPEN_ALWAYS;
else
create = CREATE_ALWAYS;
}
- handle = CreateFile(buf, access, share, NULL, create, 0, NULL);
+ handle = CreateFile(buf, access, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, create, 0, NULL);
if (handle == INVALID_HANDLE_VALUE)
{