Dmitry Timoshkov : shlwapi: Write file access also assumes read access.
Alexandre Julliard
julliard at winehq.org
Mon Sep 16 16:57:23 CDT 2013
Module: wine
Branch: master
Commit: b145f42b0f1327d10c6f26b5e5ab9bf4a3273c36
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b145f42b0f1327d10c6f26b5e5ab9bf4a3273c36
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Mon Sep 16 17:27:08 2013 +0900
shlwapi: Write file access also assumes read access.
---
dlls/shlwapi/istream.c | 4 +---
dlls/shlwapi/tests/istream.c | 16 ----------------
2 files changed, 1 insertions(+), 19 deletions(-)
diff --git a/dlls/shlwapi/istream.c b/dlls/shlwapi/istream.c
index c7242d1..42f47fe 100644
--- a/dlls/shlwapi/istream.c
+++ b/dlls/shlwapi/istream.c
@@ -420,12 +420,10 @@ HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR lpszPath, DWORD dwMode,
/* Access */
switch (STGM_ACCESS_MODE(dwMode))
{
+ case STGM_WRITE:
case STGM_READWRITE:
dwAccess = GENERIC_READ|GENERIC_WRITE;
break;
- case STGM_WRITE:
- dwAccess = GENERIC_WRITE;
- break;
case STGM_READ:
dwAccess = GENERIC_READ;
break;
diff --git a/dlls/shlwapi/tests/istream.c b/dlls/shlwapi/tests/istream.c
index 204854a..67f467b 100644
--- a/dlls/shlwapi/tests/istream.c
+++ b/dlls/shlwapi/tests/istream.c
@@ -222,27 +222,11 @@ static void test_stream_read_write(IStream *stream, DWORD mode)
ret = stream->lpVtbl->Read(stream, buf, 2, &count);
if (written != 0)
{
- /* FIXME: Remove once Wine is fixed */
- if (mode == STGM_WRITE)
-todo_wine
- ok(ret == S_OK, "IStream_Read error %#x (access %#x, written %u)\n", ret, mode, written);
- else
ok(ret == S_OK, "IStream_Read error %#x (access %#x, written %u)\n", ret, mode, written);
if (mode == STGM_WRITE || mode == STGM_READWRITE)
{
- /* FIXME: Remove once Wine is fixed */
- if (mode == STGM_WRITE)
- {
-todo_wine
ok(count == 2, "expected 2, got %u\n", count);
-todo_wine
ok(buf[0] == 0x5e && buf[1] == 0xa7, "expected 5ea7, got %02x%02x\n", buf[0], buf[1]);
- }
- else
- {
- ok(count == 2, "expected 2, got %u\n", count);
- ok(buf[0] == 0x5e && buf[1] == 0xa7, "expected 5ea7, got %02x%02x\n", buf[0], buf[1]);
- }
}
else
ok(count == 0, "expected 0, got %u\n", count);
More information about the wine-cvs
mailing list