Compare commits

...

10 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
23267ac0b6 Release v10.18 2025-11-01 18:31:18 +11:00
Alistair Leslie-Hughes
c8c2492b13 Rebase against cd858d59d6532a0cf624ff1dabc57a370deb43bf. 2025-10-31 15:17:38 +11:00
Alistair Leslie-Hughes
6e5b36c9ee Rebase against bc5f39ebf5fa3e936ad8fea726441b88716724c4. 2025-10-31 07:05:53 +11:00
Alistair Leslie-Hughes
bbcdf55b0a Updated vkd3d-latest patchset 2025-10-30 07:44:02 +11:00
Alistair Leslie-Hughes
314769efdc Rebase against 38938bdb6f752cb68d13d833be97d0c524fe827e. 2025-10-28 10:29:18 +11:00
Alistair Leslie-Hughes
fa2f323344 Rebase against 606d2f48bf8149bf45153f11ef3501eece20762c. 2025-10-25 17:34:41 +11:00
Alistair Leslie-Hughes
0ce7cd10bf Rebase against 606d2f48bf8149bf45153f11ef3501eece20762c. 2025-10-25 12:06:45 +11:00
Alistair Leslie-Hughes
f12010f53d Rebase against ff187dc851c1d9f992049688a7e7190b83250ae4. 2025-10-24 10:28:06 +11:00
Alistair Leslie-Hughes
194b2de8dc Rebase against 833f57698015a9e0c9d0606d8a99254c36c9b9d8. 2025-10-24 08:11:18 +11:00
Alistair Leslie-Hughes
3a65c61aab Rebase against ff5b9971b3a1794043ecc75e639e91a8776e169b. 2025-10-22 11:58:27 +11:00
36 changed files with 2389 additions and 1978 deletions

View File

@@ -1,4 +1,4 @@
From 68227ee19646a7c98f1b1e6eed72a7a6a2a21fc1 Mon Sep 17 00:00:00 2001
From 79d21b336b80816b5530f1f100459e1867f80ea6 Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Fri, 25 Oct 2024 10:47:31 +0200
Subject: [PATCH] mf: Implement and use HttpSchemePlugin.
@@ -15,7 +15,7 @@ Subject: [PATCH] mf: Implement and use HttpSchemePlugin.
8 files changed, 68 insertions(+), 36 deletions(-)
diff --git a/dlls/mf/main.c b/dlls/mf/main.c
index e74a4ae8e4c..120343a1be2 100644
index 537db3174cf..3a87e3207b1 100644
--- a/dlls/mf/main.c
+++ b/dlls/mf/main.c
@@ -549,6 +549,7 @@ static const IClassFactoryVtbl class_factory_vtbl =
@@ -138,10 +138,10 @@ index 7e92748aeb9..3cd16319b2a 100644
{
IMFAttributes *attributes;
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index 61daaf35741..39dfe3ca1b2 100644
index ec25dc19cd0..371e5628d9d 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -5384,7 +5384,6 @@ static void test_scheme_resolvers(void)
@@ -5873,7 +5873,6 @@ static void test_scheme_resolvers(void)
for (i = 0; i < ARRAY_SIZE(urls); i++)
{
hr = IMFSourceResolver_CreateObjectFromURL(resolver, urls[i], MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
@@ -149,7 +149,7 @@ index 61daaf35741..39dfe3ca1b2 100644
ok(hr == S_OK, "got hr %#lx\n", hr);
if (hr != S_OK)
continue;
@@ -5408,7 +5407,6 @@ static void test_scheme_resolvers(void)
@@ -5897,7 +5896,6 @@ static void test_scheme_resolvers(void)
hr = IMFAttributes_GetItem(attributes, &MF_BYTESTREAM_CONTENT_TYPE, NULL);
ok(hr == S_OK, "got hr %#lx\n", hr);
hr = IMFAttributes_GetItem(attributes, &MF_BYTESTREAM_LAST_MODIFIED_TIME, NULL);
@@ -157,7 +157,7 @@ index 61daaf35741..39dfe3ca1b2 100644
ok(hr == S_OK, "got hr %#lx\n", hr);
IMFAttributes_Release(attributes);
@@ -5416,8 +5414,7 @@ static void test_scheme_resolvers(void)
@@ -5905,8 +5903,7 @@ static void test_scheme_resolvers(void)
ok(hr == S_OK, "got hr %#lx\n", hr);
hr = IMFByteStream_GetCapabilities(byte_stream, &caps);
ok(hr == S_OK, "got hr %#lx\n", hr);
@@ -167,7 +167,7 @@ index 61daaf35741..39dfe3ca1b2 100644
|| caps == (expect_caps | MFBYTESTREAM_DOES_NOT_USE_NETWORK),
"got caps %#lx\n", caps);
hr = IMFByteStream_GetLength(byte_stream, &length);
@@ -5436,35 +5433,25 @@ static void test_scheme_resolvers(void)
@@ -5925,35 +5922,25 @@ static void test_scheme_resolvers(void)
ok(hr == MF_E_UNSUPPORTED_BYTESTREAM_TYPE, "got hr %#lx\n", hr);
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"http://test.winehq.bla/tests/test.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
@@ -200,10 +200,10 @@ index 61daaf35741..39dfe3ca1b2 100644
ok(hr == NS_E_FILE_NOT_FOUND, "got hr %#lx\n", hr);
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"mms://test.winehq.org/tests/invalid.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
- todo_wine
ok(hr == MF_E_UNSUPPORTED_BYTESTREAM_TYPE, "got hr %#lx\n", hr);
ok(hr == MF_E_UNSUPPORTED_BYTESTREAM_TYPE || hr == NS_E_FILE_NOT_FOUND, "got hr %#lx\n", hr);
IMFSourceResolver_Release(resolver);
@@ -6828,7 +6815,6 @@ static void test_network_bytestream(void)
@@ -8300,7 +8287,6 @@ static void test_network_bytestream(void)
obj_type = (MF_OBJECT_TYPE)0xdeadbeef;
object = NULL;
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"http://nonexistent.url/file.mp4", MF_RESOLUTION_BYTESTREAM, NULL, &obj_type, &object);
@@ -211,7 +211,7 @@ index 61daaf35741..39dfe3ca1b2 100644
ok(hr == NS_E_SERVER_NOT_FOUND, "Got hr %#lx.\n", hr);
ok(obj_type == MF_OBJECT_INVALID, "Unexpected obj_type %#x.\n", obj_type);
if (object) IUnknown_Release(object);
@@ -6836,9 +6822,7 @@ static void test_network_bytestream(void)
@@ -8308,9 +8294,7 @@ static void test_network_bytestream(void)
obj_type = (MF_OBJECT_TYPE)0xdeadbeef;
object = NULL;
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"http://test.winehq.org/tests/invalid.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &obj_type, &object);
@@ -221,7 +221,7 @@ index 61daaf35741..39dfe3ca1b2 100644
ok(obj_type == MF_OBJECT_INVALID, "Unexpected obj_type %#x.\n", obj_type);
if (object) IUnknown_Release(object);
@@ -6861,7 +6845,6 @@ static void test_network_bytestream(void)
@@ -8333,7 +8317,6 @@ static void test_network_bytestream(void)
hr = IMFAttributes_GetCount(attr, &count);
ok(hr == S_OK, "Got hr %#lx\n", hr);
@@ -229,7 +229,7 @@ index 61daaf35741..39dfe3ca1b2 100644
ok(count == 3, "count = %u\n", count);
PropVariantInit(&var);
@@ -6870,7 +6853,6 @@ static void test_network_bytestream(void)
@@ -8342,7 +8325,6 @@ static void test_network_bytestream(void)
ok(hr == S_OK, "Got hr %#lx\n", hr);
ok(IsEqualGUID(&key, &MF_BYTESTREAM_EFFECTIVE_URL), "Got key %s\n", debugstr_guid(&key));
ok(var.vt == VT_LPWSTR, "Got type %d\n", var.vt);
@@ -237,7 +237,7 @@ index 61daaf35741..39dfe3ca1b2 100644
ok(!lstrcmpW(var.pwszVal, EFFECTIVE_URL), "Got value %s\n", var.pszVal);
memset(&key, 0, sizeof(key));
PropVariantClear(&var);
@@ -6879,21 +6861,15 @@ static void test_network_bytestream(void)
@@ -8351,21 +8333,15 @@ static void test_network_bytestream(void)
ok(hr == S_OK, "Got hr %#lx\n", hr);
ok(IsEqualGUID(&key, &MF_BYTESTREAM_CONTENT_TYPE), "Got key %s\n", debugstr_guid(&key));
ok(var.vt == VT_LPWSTR, "Got type %d\n", var.vt);
@@ -259,7 +259,7 @@ index 61daaf35741..39dfe3ca1b2 100644
ok(var.blob.pBlobData != NULL, "Got NULL value\n");
if (var.blob.cbSize == sizeof(LAST_MODIFIED_TIME) && var.blob.pBlobData)
ok(!memcmp(var.blob.pBlobData, LAST_MODIFIED_TIME, sizeof(LAST_MODIFIED_TIME)), "Got wrong value\n");
@@ -6912,9 +6888,7 @@ static void test_network_bytestream(void)
@@ -8384,9 +8360,7 @@ static void test_network_bytestream(void)
ptr = NULL;
hr = IUnknown_QueryInterface(object, &IID_IMFByteStreamCacheControl, &ptr);
@@ -269,7 +269,7 @@ index 61daaf35741..39dfe3ca1b2 100644
ok(ptr != NULL, "Got NULL ptr.\n");
if (SUCCEEDED(hr) && ptr)
{
@@ -6929,9 +6903,7 @@ static void test_network_bytestream(void)
@@ -8401,9 +8375,7 @@ static void test_network_bytestream(void)
ptr = NULL;
hr = IUnknown_QueryInterface(object, &IID_IMFByteStreamBuffering, &ptr);
@@ -279,7 +279,7 @@ index 61daaf35741..39dfe3ca1b2 100644
ok(ptr != NULL, "Got NULL ptr.\n");
if (SUCCEEDED(hr) && ptr)
{
@@ -6998,9 +6970,7 @@ static void test_network_bytestream(void)
@@ -8470,9 +8442,7 @@ static void test_network_bytestream(void)
ptr = NULL;
hr = IUnknown_QueryInterface(object, &IID_IMFByteStreamTimeSeek, &ptr);
@@ -289,7 +289,7 @@ index 61daaf35741..39dfe3ca1b2 100644
ok(ptr != NULL, "Got NULL ptr.\n");
if (SUCCEEDED(hr) && ptr)
{
@@ -7059,6 +7029,9 @@ static void test_network_bytestream(void)
@@ -8531,6 +8501,9 @@ static void test_network_bytestream(void)
ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
ok(written == 0, "written = %lu\n", written);
@@ -299,7 +299,7 @@ index 61daaf35741..39dfe3ca1b2 100644
free(tmp);
hr = IMFByteStream_GetLength((IMFByteStream*)object, &len);
@@ -7066,7 +7039,6 @@ static void test_network_bytestream(void)
@@ -8538,7 +8511,6 @@ static void test_network_bytestream(void)
ok(len != 0, "len = %I64u\n", len);
hr = IMFByteStream_Flush((IMFByteStream*)object);
@@ -307,7 +307,7 @@ index 61daaf35741..39dfe3ca1b2 100644
ok(hr == S_OK, "Got hr %#lx\n", hr);
}
@@ -7094,9 +7066,7 @@ static void test_network_bytestream(void)
@@ -8566,9 +8538,7 @@ static void test_network_bytestream(void)
ptr = NULL;
hr = IUnknown_QueryInterface(object, &IID_IMFMediaEventGenerator, &ptr);
@@ -342,5 +342,5 @@ index d9a2981f5a7..2369dbf31fd 100644
+ return create_http_bytestream(url, out);
+}
--
2.45.2
2.51.0

View File

@@ -1,20 +1,19 @@
From d683f0129b0df79227b23133874960284b76baa8 Mon Sep 17 00:00:00 2001
From 3db26a0859c98d02796b1a7b8f8f8718c8c90386 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 11 Sep 2020 17:55:59 +1000
Subject: [PATCH] include: Remove interfaces already define in msxml6.idl
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/msxml3/factory.c | 3 +-
dlls/msxml3/tests/saxreader.c | 1 +
dlls/msxml3/tests/schema.c | 5 ++
dlls/msxml3/uuid.c | 10 ++++
include/msxml2.idl | 101 ----------------------------------
include/msxml6.idl | 24 ++++----
6 files changed, 29 insertions(+), 115 deletions(-)
dlls/msxml3/factory.c | 3 +--
dlls/msxml3/tests/saxreader.c | 1 +
dlls/msxml3/tests/schema.c | 5 +++++
dlls/msxml3/uuid.c | 3 +++
include/msxml6.idl | 24 ++++++++++++------------
5 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c
index e91666c6d79..e35839db2a3 100644
index 58477529708..3a198d4c516 100644
--- a/dlls/msxml3/factory.c
+++ b/dlls/msxml3/factory.c
@@ -31,6 +31,7 @@
@@ -25,7 +24,7 @@ index e91666c6d79..e35839db2a3 100644
#include "xmlparser.h"
/* undef the #define in msxml2 so that we can access the v.2 version
@@ -43,8 +44,6 @@
@@ -53,8 +54,6 @@ DEFINE_GUID(CLSID_XSLTemplate60, 0x88d96a08, 0xf192, 0x11d4, 0xa6, 0x5f, 0x00, 0
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
@@ -35,7 +34,7 @@ index e91666c6d79..e35839db2a3 100644
typedef HRESULT (*DOMFactoryCreateInstanceFunc)(MSXML_VERSION, void**);
diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c
index e123d4eba5a..48cfa8f5593 100644
index cba3e5c6a63..a7fe38f0384 100644
--- a/dlls/msxml3/tests/saxreader.c
+++ b/dlls/msxml3/tests/saxreader.c
@@ -29,6 +29,7 @@
@@ -62,197 +61,8 @@ index 50e5a743b82..c83e72e136a 100644
#include "wine/test.h"
static const WCHAR xdr_schema1_uri[] = L"x-schema:test1.xdr";
diff --git a/dlls/msxml3/uuid.c b/dlls/msxml3/uuid.c
index 7e50b439146..7214d23c5dc 100644
--- a/dlls/msxml3/uuid.c
+++ b/dlls/msxml3/uuid.c
@@ -41,6 +41,16 @@
#include "initguid.h"
#include "msxml2.h"
+/* Cannot include msxml6 here since we will get a duplicate LIBID_MSXML2 error. */
+DEFINE_GUID(CLSID_FreeThreadedDOMDocument60, 0x88d96a06, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_MXNamespaceManager60, 0x88d96a11, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_MXXMLWriter60, 0x88d96a0f, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_SAXAttributes60, 0x88d96a0e, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_SAXXMLReader60, 0x88d96a0c, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_ServerXMLHTTP60, 0x88d96a0b, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_XMLHTTP60, 0x88d96a0a, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_XSLTemplate60, 0x88d96a08, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+
/*
* Note that because of a #define in msxml2.h, we end up initializing
* CLSID_DOMDocument2 to be the v.3 version independent DOMDocument
diff --git a/include/msxml2.idl b/include/msxml2.idl
index 848bc13952a..85bb6a5b0cb 100644
--- a/include/msxml2.idl
+++ b/include/msxml2.idl
@@ -1612,15 +1612,6 @@ coclass FreeThreadedDOMDocument40
[default, source] dispinterface XMLDOMDocumentEvents;
}
-[
- uuid(88d96a06-f192-11d4-a65f-0040963251e5),
-]
-coclass FreeThreadedDOMDocument60
-{
- [default] interface IXMLDOMDocument3;
- [default, source] dispinterface XMLDOMDocumentEvents;
-}
-
[
helpstring("Free threaded XML DOM Document"),
progid("Msxml2.FreeThreadedDOMDocument"),
@@ -1662,14 +1653,6 @@ coclass XMLHTTP40
[default] interface IXMLHTTPRequest;
}
-[
- uuid(88d96a0a-f192-11d4-a65f-0040963251e5)
-]
-coclass XMLHTTP60
-{
- [default] interface IXMLHTTPRequest;
-}
-
[
helpstring("XML HTTP"),
progid("Msxml2.XMLHTTP"),
@@ -1702,14 +1685,6 @@ coclass ServerXMLHTTP40
[default] interface IServerXMLHTTPRequest2;
}
-[
- uuid(88d96a0b-f192-11d4-a65f-0040963251e5)
-]
-coclass ServerXMLHTTP60
-{
- [default] interface IServerXMLHTTPRequest2;
-}
-
[
helpstring("Server XML HTTP"),
progid("Msxml2.ServerXMLHTTP"),
@@ -1790,14 +1765,6 @@ coclass XSLTemplate40
[default] interface IXSLTemplate;
}
-[
- uuid(88d96a08-f192-11d4-a65f-0040963251e5)
-]
-coclass XSLTemplate60
-{
- [default] interface IXSLTemplate;
-}
-
[
helpstring("XSL Template"),
progid("Msxml2.XSLTemplate"),
@@ -3289,15 +3256,6 @@ coclass SAXXMLReader40
interface ISAXXMLReader;
}
-[
- uuid(88d96a0c-f192-11d4-a65f-0040963251e5)
-]
-coclass SAXXMLReader60
-{
- [default] interface IVBSAXXMLReader;
- interface ISAXXMLReader;
-}
-
[
helpstring("SAX XML Reader"),
progid("Msxml2.SAXXMLReader"),
@@ -3372,26 +3330,6 @@ coclass MXHTMLWriter40
interface IVBSAXLexicalHandler;
}
-[
- uuid(88d96a10-f192-11d4-a65f-0040963251e5)
-]
-coclass MXHTMLWriter60
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXDeclHandler;
- interface ISAXDTDHandler;
- interface ISAXErrorHandler;
- interface ISAXLexicalHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
[
helpstring("MXXMLWriter 3.0"),
progid("Msxml2.MXXMLWriter.3.0"),
@@ -3436,26 +3374,6 @@ coclass MXXMLWriter40
interface IVBSAXLexicalHandler;
}
-[
- uuid(88d96a0f-f192-11d4-a65f-0040963251e5)
-]
-coclass MXXMLWriter60
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXDeclHandler;
- interface ISAXDTDHandler;
- interface ISAXErrorHandler;
- interface ISAXLexicalHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
[
helpstring("MXXMLWriter"),
progid("Msxml2.MXXMLWriter"),
@@ -3498,15 +3416,6 @@ coclass MXNamespaceManager40
interface IMXNamespaceManager;
}
-[
- uuid(88d96a11-f192-11d4-a65f-0040963251e5)
-]
-coclass MXNamespaceManager60
-{
- [default] interface IVBMXNamespaceManager;
- interface IMXNamespaceManager;
-}
-
[
helpstring("SAXAttributes 3.0"),
progid("Msxml2.SAXAttributes.3.0"),
@@ -3531,16 +3440,6 @@ coclass SAXAttributes40
interface ISAXAttributes;
}
-[
- uuid(88d96a0e-f192-11d4-a65f-0040963251e5)
-]
-coclass SAXAttributes60
-{
- [default] interface IMXAttributes;
- interface IVBSAXAttributes;
- interface ISAXAttributes;
-}
-
[
helpstring("SAXAttributes"),
progid("Msxml2.SAXAttributes"),
diff --git a/include/msxml6.idl b/include/msxml6.idl
index d4a5c490243..7396826a1f6 100644
index ead87be7516..bf7e0905057 100644
--- a/include/msxml6.idl
+++ b/include/msxml6.idl
@@ -3065,18 +3065,6 @@ coclass DOMDocument60
@@ -294,5 +104,5 @@ index d4a5c490243..7396826a1f6 100644
helpstring("XML HTTP 6.0"),
progid("Msxml2.XMLHTTP.6.0"),
--
2.43.0
2.51.0

View File

@@ -1,4 +1,4 @@
From 5bcc58b53dd99c5d6d85141d5658a5d7e98d8253 Mon Sep 17 00:00:00 2001
From a7e02a05c19ee1a371a36fd98ec9a0a6cfb2b8d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Tue, 8 Sep 2020 18:43:52 +0200
Subject: [PATCH] msxml3: Implement FreeThreadedXMLHTTP60.
@@ -11,9 +11,9 @@ Update from Gijs Vermeulen <gijsvrm@gmail.com>
dlls/msxml3/msxml_private.h | 1 +
dlls/msxml3/tests/httpreq.c | 395 +++++++++++++++++++++++++++-
dlls/msxml3/tests/schema.c | 6 +
dlls/msxml3/uuid.c | 5 +
dlls/msxml3/uuid.c | 6 +
include/msxml6.idl | 22 +-
8 files changed, 915 insertions(+), 16 deletions(-)
8 files changed, 916 insertions(+), 16 deletions(-)
diff --git a/dlls/msxml3/Makefile.in b/dlls/msxml3/Makefile.in
index 7e59a223143..5044c4e2c79 100644
@@ -27,10 +27,10 @@ index 7e59a223143..5044c4e2c79 100644
SOURCES = \
diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c
index e35839db2a3..0e2482d61be 100644
index 3a198d4c516..25c2abbbe76 100644
--- a/dlls/msxml3/factory.c
+++ b/dlls/msxml3/factory.c
@@ -279,6 +279,7 @@ static HRESULT DOMClassFactory_Create(const GUID *clsid, REFIID riid, void **ppv
@@ -289,6 +289,7 @@ static HRESULT DOMClassFactory_Create(const GUID *clsid, REFIID riid, void **ppv
static ClassFactory xmldoccf = { { &ClassFactoryVtbl }, XMLDocument_create };
static ClassFactory httpreqcf = { { &ClassFactoryVtbl }, XMLHTTPRequest_create };
@@ -38,7 +38,7 @@ index e35839db2a3..0e2482d61be 100644
static ClassFactory serverhttp = { { &ClassFactoryVtbl }, ServerXMLHTTP_create };
static ClassFactory xsltemplatecf = { { &ClassFactoryVtbl }, XSLTemplate_create };
static ClassFactory mxnsmanagercf = { {&ClassFactoryVtbl }, MXNamespaceManager_create };
@@ -340,6 +341,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, void **ppv )
@@ -350,6 +351,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, void **ppv )
{
cf = &httpreqcf.IClassFactory_iface;
}
@@ -1038,28 +1038,19 @@ index c83e72e136a..c896f1e6a04 100644
#include "wine/test.h"
diff --git a/dlls/msxml3/uuid.c b/dlls/msxml3/uuid.c
index 7214d23c5dc..320a7e04fa3 100644
index 7e50b439146..15318d3ad1d 100644
--- a/dlls/msxml3/uuid.c
+++ b/dlls/msxml3/uuid.c
@@ -43,6 +43,7 @@
@@ -56,3 +56,9 @@
*/
/* Cannot include msxml6 here since we will get a duplicate LIBID_MSXML2 error. */
DEFINE_GUID(CLSID_FreeThreadedDOMDocument60, 0x88d96a06, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
DEFINE_GUID(CLSID_XMLSchemaCache60, 0x88d96a07, 0xf192, 0x11d4, 0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5);
+
+DEFINE_GUID(CLSID_FreeThreadedXMLHTTP60, 0x88d96a09, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
DEFINE_GUID(CLSID_MXNamespaceManager60, 0x88d96a11, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
DEFINE_GUID(CLSID_MXXMLWriter60, 0x88d96a0f, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
DEFINE_GUID(CLSID_SAXAttributes60, 0x88d96a0e, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
@@ -50,6 +51,10 @@ DEFINE_GUID(CLSID_SAXXMLReader60, 0x88d96a0c, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x
DEFINE_GUID(CLSID_ServerXMLHTTP60, 0x88d96a0b, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
DEFINE_GUID(CLSID_XMLHTTP60, 0x88d96a0a, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
DEFINE_GUID(CLSID_XSLTemplate60, 0x88d96a08, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(IID_IXMLHTTPRequest2, 0xe5d37dc0, 0x552a, 0x4d52, 0x9c,0xc0, 0xa1,0x4d,0x54,0x6f,0xbd,0x04);
+DEFINE_GUID(IID_IXMLHTTPRequest3, 0xa1c9feee, 0x0617, 0x4f23, 0x9d,0x58, 0x89,0x61,0xea,0x43,0x56,0x7c);
+DEFINE_GUID(IID_IXMLHTTPRequest2Callback, 0xa44a9299, 0xe321, 0x40de, 0x88,0x66, 0x34,0x1b,0x41,0x66,0x91,0x62);
+DEFINE_GUID(IID_IXMLHTTPRequest3Callback, 0xb9e57830, 0x8c6c, 0x4a6f, 0x9c,0x13, 0x47,0x77,0x2b,0xb0,0x47,0xbb);
/*
* Note that because of a #define in msxml2.h, we end up initializing
diff --git a/include/msxml6.idl b/include/msxml6.idl
index bf7e0905057..a02f7b2db14 100644
--- a/include/msxml6.idl
@@ -1101,5 +1092,5 @@ index bf7e0905057..a02f7b2db14 100644
helpstring("XML DOM Document 6.0"),
progid("Msxml2.DOMDocument.6.0"),
--
2.47.2
2.51.0

View File

@@ -1,19 +1,18 @@
From 9409a546aa17e178a6f1ce07cdaa8e0186429239 Mon Sep 17 00:00:00 2001
From a1d009010d674af140dbcb7d8b4dab4fad7dbc2e Mon Sep 17 00:00:00 2001
From: Jefferson Carpenter <jeffersoncarpenter2@gmail.com>
Date: Thu, 4 Nov 2021 22:30:05 +0000
Subject: [PATCH] msxml3: Write to DOMDocument mxwriter destination in
endDocument.
---
dlls/msxml3/mxwriter.c | 41 +++++++++++++++++++++++++++++++++--
dlls/msxml3/tests/saxreader.c | 1 +
2 files changed, 40 insertions(+), 2 deletions(-)
dlls/msxml3/mxwriter.c | 41 +++++++++++++++++++++++++++++++++++++++--
1 file changed, 39 insertions(+), 2 deletions(-)
diff --git a/dlls/msxml3/mxwriter.c b/dlls/msxml3/mxwriter.c
index 4a2844bcf08..8caf8979692 100644
index 29b286356ec..1f4030db7cb 100644
--- a/dlls/msxml3/mxwriter.c
+++ b/dlls/msxml3/mxwriter.c
@@ -189,6 +189,7 @@ typedef struct
@@ -168,6 +168,7 @@ typedef struct
BSTR element;
IStream *dest;
@@ -21,7 +20,7 @@ index 4a2844bcf08..8caf8979692 100644
output_buffer buffer;
} mxwriter;
@@ -850,6 +851,7 @@ static ULONG WINAPI mxwriter_Release(IMXWriter *iface)
@@ -829,6 +830,7 @@ static ULONG WINAPI mxwriter_Release(IMXWriter *iface)
free_output_buffer(&This->buffer);
if (This->dest) IStream_Release(This->dest);
@@ -29,7 +28,7 @@ index 4a2844bcf08..8caf8979692 100644
SysFreeString(This->version);
SysFreeString(This->encoding);
@@ -914,6 +916,8 @@ static HRESULT WINAPI mxwriter_put_output(IMXWriter *iface, VARIANT dest)
@@ -893,6 +895,8 @@ static HRESULT WINAPI mxwriter_put_output(IMXWriter *iface, VARIANT dest)
{
if (This->dest) IStream_Release(This->dest);
This->dest = NULL;
@@ -38,7 +37,7 @@ index 4a2844bcf08..8caf8979692 100644
close_output_buffer(This);
break;
}
@@ -929,12 +933,33 @@ static HRESULT WINAPI mxwriter_put_output(IMXWriter *iface, VARIANT dest)
@@ -908,12 +912,33 @@ static HRESULT WINAPI mxwriter_put_output(IMXWriter *iface, VARIANT dest)
if (This->dest) IStream_Release(This->dest);
This->dest = stream;
@@ -72,7 +71,7 @@ index 4a2844bcf08..8caf8979692 100644
default:
FIXME("unhandled destination type %s\n", debugstr_variant(&dest));
return E_NOTIMPL;
@@ -1201,7 +1226,7 @@ static HRESULT WINAPI SAXContentHandler_putDocumentLocator(
@@ -1180,7 +1205,7 @@ static HRESULT WINAPI SAXContentHandler_putDocumentLocator(
{
mxwriter *This = impl_from_ISAXContentHandler( iface );
FIXME("(%p)->(%p)\n", This, locator);
@@ -81,7 +80,7 @@ index 4a2844bcf08..8caf8979692 100644
}
static HRESULT WINAPI SAXContentHandler_startDocument(ISAXContentHandler *iface)
@@ -1239,10 +1264,21 @@ static HRESULT WINAPI SAXContentHandler_startDocument(ISAXContentHandler *iface)
@@ -1218,10 +1243,21 @@ static HRESULT WINAPI SAXContentHandler_startDocument(ISAXContentHandler *iface)
static HRESULT WINAPI SAXContentHandler_endDocument(ISAXContentHandler *iface)
{
@@ -104,7 +103,7 @@ index 4a2844bcf08..8caf8979692 100644
}
static HRESULT WINAPI SAXContentHandler_startPrefixMapping(
@@ -2630,6 +2666,7 @@ HRESULT MXWriter_create(MSXML_VERSION version, void **ppObj)
@@ -2608,6 +2644,7 @@ HRESULT MXWriter_create(MSXML_VERSION version, void **ppObj)
This->newline = FALSE;
This->dest = NULL;
@@ -112,18 +111,6 @@ index 4a2844bcf08..8caf8979692 100644
hr = init_output_buffer(This->xml_enc, &This->buffer);
if (hr != S_OK) {
diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c
index e123d4eba5a..f933ffe85a2 100644
--- a/dlls/msxml3/tests/saxreader.c
+++ b/dlls/msxml3/tests/saxreader.c
@@ -4563,6 +4563,7 @@ static void test_mxwriter_domdoc(void)
todo_wine
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ if (!node) return;
hr = IXMLDOMNode_get_nodeName(node, &str);
todo_wine {
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
--
2.43.0
2.51.0

View File

@@ -1,4 +1,4 @@
From f918a9c53c678d3234cc6b51083af524087966bb Mon Sep 17 00:00:00 2001
From 238af21a74a01c54ae3e24b6873b6b4fd66d7368 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Fri, 1 Dec 2023 14:55:20 -0600
Subject: [PATCH] ntdll: Exclude natively mapped areas from free areas list.
@@ -8,7 +8,7 @@ Subject: [PATCH] ntdll: Exclude natively mapped areas from free areas list.
1 file changed, 96 insertions(+), 9 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index a5270649c0d..0fe761a3b85 100644
index b5115693758..a08c75dd2c1 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -144,6 +144,7 @@ struct file_view
@@ -31,7 +31,7 @@ index a5270649c0d..0fe761a3b85 100644
@@ -1380,7 +1383,9 @@ static void dump_view( struct file_view *view )
BYTE prot = get_page_vprot( addr );
TRACE( "View: %p - %p", addr, addr + view->size - 1 );
TRACE( "View: %p - %p %s", addr, addr + view->size - 1, get_prot_str(view->protect) );
- if (view->protect & VPROT_SYSTEM)
+ if (view->protect & VPROT_NATIVE)
+ TRACE(" (native)\n");
@@ -197,7 +197,7 @@ index a5270649c0d..0fe761a3b85 100644
}
done:
status = create_view( view_ret, ptr, size, vprot );
@@ -4746,7 +4828,12 @@ void virtual_set_force_exec( BOOL enable )
@@ -4882,7 +4964,12 @@ void virtual_set_force_exec( BOOL enable )
WINE_RB_FOR_EACH_ENTRY( view, &views_tree, struct file_view, entry )
{
/* file mappings are always accessible */
@@ -212,5 +212,5 @@ index a5270649c0d..0fe761a3b85 100644
mprotect_range( view->base, view->size, commit, 0 );
}
--
2.47.2
2.51.0

View File

@@ -1,4 +1,4 @@
From f0d41c59ac06aabfba83d598fb017c7f0a918a99 Mon Sep 17 00:00:00 2001
From 5f3feef99f8c9740f04dbe0ee1b23ca27d60548e Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 20:56:49 -0700
Subject: [PATCH] ntdll: Add support for creating reparse points.
@@ -12,11 +12,11 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
4 files changed, 310 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 242eb15ec19..ccd5095f3ba 100644
index b675da34d58..63e3bb5bdc7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2132,6 +2132,8 @@ AC_CHECK_FUNCS(\
prctl \
@@ -2137,6 +2137,8 @@ AC_CHECK_FUNCS(\
process_vm_writev \
sched_getcpu \
sched_yield \
+ renameat \

View File

@@ -1,19 +1,19 @@
From e4b0e1bd0ae993ac209367318a98ad63a5eec62b Mon Sep 17 00:00:00 2001
From 4d813b6202a9fb74ee1ca1573658bd27dce11f78 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Mon, 3 May 2021 09:28:08 -0600
Subject: [PATCH] ntdll: Add support for creating Unix/Linux symlinks.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
dlls/ntdll/unix/file.c | 38 ++++++++++++++++++++++++++------------
include/winnt.h | 1 +
3 files changed, 62 insertions(+), 12 deletions(-)
dlls/ntdll/unix/file.c | 38 ++++++++++++++++++++++++++------------
include/winnt.h | 1 +
2 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index fe1c50468a4..f87117438b8 100644
index cb1932949d6..4fa7c610c46 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -3761,20 +3761,33 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
@@ -3864,20 +3864,33 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
* *) Append the base64-url encoded reparse point buffer
* *) Append the filename of the first continuing symlink (0) in case we need it
*/
@@ -58,7 +58,7 @@ index fe1c50468a4..f87117438b8 100644
/* Produce the link in a temporary location in the same folder */
strcpy( tmpdir, unix_src );
@@ -3839,7 +3852,8 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
@@ -3942,7 +3955,8 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
}
/* create the very last link directory */
@@ -69,17 +69,17 @@ index fe1c50468a4..f87117438b8 100644
strcpy( link_path, target_path );
strcpy( link_dir, link_path );
diff --git a/include/winnt.h b/include/winnt.h
index 019d0b16693..469287cc0ef 100644
index 24485ef0e39..1e31471e797 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -2330,6 +2330,7 @@ extern struct _TEB * WINAPI NtCurrentTeb(void);
@@ -2563,6 +2563,7 @@ static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void)
#define IO_REPARSE_TAG_CLOUD_MASK __MSABI_LONG(0x0000F000)
#define IO_REPARSE_TAG_APPEXECLINK __MSABI_LONG(0x8000001B)
#define IO_REPARSE_TAG_GVFS __MSABI_LONG(0x9000001C)
#define IO_REPARSE_TAG_PROJFS __MSABI_LONG(0x9000001C)
+#define IO_REPARSE_TAG_LX_SYMLINK __MSABI_LONG(0xA000001D)
#define IO_REPARSE_TAG_STORAGE_SYNC __MSABI_LONG(0x8000001E)
#define IO_REPARSE_TAG_WCI_TOMBSTONE __MSABI_LONG(0xA000001F)
#define IO_REPARSE_TAG_UNHANDLED __MSABI_LONG(0x80000020)
--
2.37.2
2.51.0

View File

@@ -1,4 +1,4 @@
From 0c71b9c48afdc0478941417595998ab21fcf12ae Mon Sep 17 00:00:00 2001
From 898a258576725ac62bbcafb3a7f0e86b1aeff37a Mon Sep 17 00:00:00 2001
From: Alex Henrie <alexhenrie24@gmail.com>
Date: Tue, 29 Dec 2015 00:48:02 -0700
Subject: [PATCH] mountmgr.sys: Do a device check before returning a default
@@ -12,20 +12,20 @@ Fixes https://bugs.winehq.org/show_bug.cgi?id=39793
3 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
index 328b0b2f344..0757036c8e3 100644
index 2280ac82123..39aa6d37ce0 100644
--- a/dlls/mountmgr.sys/device.c
+++ b/dlls/mountmgr.sys/device.c
@@ -1884,7 +1884,7 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p
UNICODE_STRING nt_name, symlink_name, default_name;
@@ -1920,7 +1920,7 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p
DEVICE_OBJECT *dev_obj;
NTSTATUS status;
const WCHAR *windows_ports_key_name;
- struct set_dosdev_symlink_params params = { dosdevices_path, unix_path };
+ struct set_dosdev_symlink_params params = { dosdevices_path, unix_path, driver == serial_driver };
/* create DOS device */
if (MOUNTMGR_CALL( set_dosdev_symlink, &params )) return FALSE;
diff --git a/dlls/mountmgr.sys/unixlib.c b/dlls/mountmgr.sys/unixlib.c
index 13f6fbecf09..0332f6f6018 100644
index bcc36383834..007db05d883 100644
--- a/dlls/mountmgr.sys/unixlib.c
+++ b/dlls/mountmgr.sys/unixlib.c
@@ -36,6 +36,7 @@
@@ -36,7 +36,7 @@ index 13f6fbecf09..0332f6f6018 100644
#include <unistd.h>
#include "unixlib.h"
@@ -304,6 +305,27 @@ static NTSTATUS set_dosdev_symlink( void *args )
@@ -298,6 +299,27 @@ static NTSTATUS set_dosdev_symlink( void *args )
char *path;
NTSTATUS status = STATUS_SUCCESS;
@@ -65,10 +65,10 @@ index 13f6fbecf09..0332f6f6018 100644
if (params->dest && params->dest[0])
diff --git a/dlls/mountmgr.sys/unixlib.h b/dlls/mountmgr.sys/unixlib.h
index d70371876fa..ef5b10732f6 100644
index c17e5f70638..dd29a70c8a8 100644
--- a/dlls/mountmgr.sys/unixlib.h
+++ b/dlls/mountmgr.sys/unixlib.h
@@ -90,6 +90,7 @@ struct set_dosdev_symlink_params
@@ -91,6 +91,7 @@ struct set_dosdev_symlink_params
{
const char *dev;
const char *dest;
@@ -77,5 +77,5 @@ index d70371876fa..ef5b10732f6 100644
struct get_volume_dos_devices_params
--
2.37.2
2.51.0

View File

@@ -1,74 +0,0 @@
From 291a45af5ab416fc896f1343453c7e3a24f188d8 Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Wed, 29 Jun 2022 16:05:48 +0200
Subject: [PATCH] scrrun: Implement MoveFolder().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52128
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/filesystem.c | 7 +++----
dlls/scrrun/tests/filesystem.c | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index e53355267db..ab02d4680cd 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3803,12 +3803,11 @@ static HRESULT WINAPI filesys_MoveFile(IFileSystem3 *iface, BSTR source, BSTR de
return MoveFileW(source, destination) ? S_OK : create_error(GetLastError());
}
-static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface,BSTR Source,
- BSTR Destination)
+static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR destination)
{
- FIXME("%p %s %s\n", iface, debugstr_w(Source), debugstr_w(Destination));
+ TRACE("%p %s %s\n", iface, debugstr_w(source), debugstr_w(destination));
- return E_NOTIMPL;
+ return MoveFileW(source, destination) ? S_OK : create_error(GetLastError());
}
static inline HRESULT copy_file(const WCHAR *source, DWORD source_len,
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index e53bd092ce9..7a5de4407a8 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2639,6 +2639,25 @@ static void test_MoveFile(void)
SysFreeString(str);
}
+static void test_MoveFolder(void)
+{
+ BSTR src, dst;
+ WCHAR buffW1[MAX_PATH],buffW2[MAX_PATH];
+ HRESULT hr;
+
+ get_temp_path(L"foo", buffW1);
+ get_temp_path(L"bar", buffW2);
+
+ ok(CreateDirectoryW(buffW1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW1));
+ src = SysAllocString(buffW1);
+ dst = SysAllocString(buffW2);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
+ ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
+}
+
static void test_DoOpenPipeStream(void)
{
static const char testdata[] = "test";
@@ -2772,6 +2791,7 @@ START_TEST(filesystem)
test_GetExtensionName();
test_GetSpecialFolder();
test_MoveFile();
+ test_MoveFolder();
test_DoOpenPipeStream();
IFileSystem3_Release(fs3);
--
2.43.0

View File

@@ -1,61 +0,0 @@
From 0e42b8f30afc0984703f09258e1fbc6224c207fa Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Wed, 29 Jun 2022 16:11:56 +0200
Subject: [PATCH] scrrun: Check for null and empty arguments in MoveFolder.
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/filesystem.c | 3 +++
dlls/scrrun/tests/filesystem.c | 15 ++++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index ab02d4680cd..a56af2f0461 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3807,6 +3807,9 @@ static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR
{
TRACE("%p %s %s\n", iface, debugstr_w(source), debugstr_w(destination));
+ if(!source || !source[0] || !destination || !destination[0])
+ return E_INVALIDARG;
+
return MoveFileW(source, destination) ? S_OK : create_error(GetLastError());
}
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 7a5de4407a8..3ddd782a6fe 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2641,7 +2641,7 @@ static void test_MoveFile(void)
static void test_MoveFolder(void)
{
- BSTR src, dst;
+ BSTR src, dst, str, empty;
WCHAR buffW1[MAX_PATH],buffW2[MAX_PATH];
HRESULT hr;
@@ -2656,6 +2656,19 @@ static void test_MoveFolder(void)
SysFreeString(src);
SysFreeString(dst);
ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
+
+ str = SysAllocString(L"null.dir");
+ empty = SysAllocString(L"");
+ hr = IFileSystem3_MoveFolder(fs3, str, NULL);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
+ hr = IFileSystem3_MoveFolder(fs3, NULL, str);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
+ hr = IFileSystem3_MoveFolder(fs3, str, empty);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
+ hr = IFileSystem3_MoveFolder(fs3, empty, str);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(str);
+ SysFreeString(empty);
}
static void test_DoOpenPipeStream(void)
--
2.43.0

View File

@@ -1,35 +0,0 @@
From 8aadb303edcc5b1fc951bbdef62269a1d42ad7aa Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Wed, 29 Jun 2022 16:15:47 +0200
Subject: [PATCH] scrrun: Test MoveFolder with already existing destination.
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/tests/filesystem.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 3ddd782a6fe..4305ac394e6 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2669,6 +2669,17 @@ static void test_MoveFolder(void)
ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
SysFreeString(empty);
+
+ ok(CreateDirectoryW(buffW1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW1));
+ ok(CreateDirectoryW(buffW2, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW2));
+ src = SysAllocString(buffW1);
+ dst = SysAllocString(buffW2);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst); /* dst already exists */
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
+ ok(RemoveDirectoryW(buffW1), "can't remove %s directory\n", wine_dbgstr_w(buffW1));
+ ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
}
static void test_DoOpenPipeStream(void)
--
2.43.0

View File

@@ -1,66 +0,0 @@
From bbf3d65137f48e763a8a7e4c1eee1dcaed657fd9 Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Wed, 29 Jun 2022 16:24:40 +0200
Subject: [PATCH] scrrun: Check for non-existant source in MoveFolder().
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/filesystem.c | 16 +++++++++++++++-
dlls/scrrun/tests/filesystem.c | 7 +++++++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index a56af2f0461..5c4b13d48b8 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3803,6 +3803,20 @@ static HRESULT WINAPI filesys_MoveFile(IFileSystem3 *iface, BSTR source, BSTR de
return MoveFileW(source, destination) ? S_OK : create_error(GetLastError());
}
+static inline HRESULT create_movefolder_error(DWORD err)
+{
+ switch(err) {
+ case ERROR_FILE_NOT_FOUND:
+ case ERROR_PATH_NOT_FOUND: return CTL_E_PATHNOTFOUND;
+ case ERROR_ACCESS_DENIED: return CTL_E_PERMISSIONDENIED;
+ case ERROR_FILE_EXISTS: return CTL_E_FILEALREADYEXISTS;
+ case ERROR_ALREADY_EXISTS: return CTL_E_FILEALREADYEXISTS;
+ default:
+ FIXME("Unsupported error code: %ld\n", err);
+ return E_FAIL;
+ }
+}
+
static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR destination)
{
TRACE("%p %s %s\n", iface, debugstr_w(source), debugstr_w(destination));
@@ -3810,7 +3824,7 @@ static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR
if(!source || !source[0] || !destination || !destination[0])
return E_INVALIDARG;
- return MoveFileW(source, destination) ? S_OK : create_error(GetLastError());
+ return MoveFileW(source, destination) ? S_OK : create_movefolder_error(GetLastError());
}
static inline HRESULT copy_file(const WCHAR *source, DWORD source_len,
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 4305ac394e6..9b352797073 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2680,6 +2680,13 @@ static void test_MoveFolder(void)
SysFreeString(dst);
ok(RemoveDirectoryW(buffW1), "can't remove %s directory\n", wine_dbgstr_w(buffW1));
ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
+
+ src = SysAllocString(buffW1);
+ dst = SysAllocString(buffW2);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst); /* src nonexistant */
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
}
static void test_DoOpenPipeStream(void)
--
2.43.0

View File

@@ -1,79 +0,0 @@
From e7ce13576f0ef1b73622a32568fce45eda879613 Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Wed, 29 Jun 2022 16:29:55 +0200
Subject: [PATCH] scrrun: Check that source is directory in MoveFolder().
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/filesystem.c | 10 +++++++++-
dlls/scrrun/tests/filesystem.c | 14 ++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index 5c4b13d48b8..72a15aae545 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3806,6 +3806,7 @@ static HRESULT WINAPI filesys_MoveFile(IFileSystem3 *iface, BSTR source, BSTR de
static inline HRESULT create_movefolder_error(DWORD err)
{
switch(err) {
+ case ERROR_INVALID_NAME:
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND: return CTL_E_PATHNOTFOUND;
case ERROR_ACCESS_DENIED: return CTL_E_PERMISSIONDENIED;
@@ -3819,12 +3820,19 @@ static inline HRESULT create_movefolder_error(DWORD err)
static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR destination)
{
+ int len;
+ WCHAR src_path[MAX_PATH];
+
TRACE("%p %s %s\n", iface, debugstr_w(source), debugstr_w(destination));
if(!source || !source[0] || !destination || !destination[0])
return E_INVALIDARG;
- return MoveFileW(source, destination) ? S_OK : create_movefolder_error(GetLastError());
+ len = SysStringLen(source);
+ lstrcpyW(src_path, source);
+ if (source[len-1] != '\\' && source[len-1] != '/') wcscat(src_path, L"\\");
+
+ return MoveFileW(src_path, destination) ? S_OK : create_movefolder_error(GetLastError());
}
static inline HRESULT copy_file(const WCHAR *source, DWORD source_len,
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 9b352797073..0236a02aa74 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2644,6 +2644,7 @@ static void test_MoveFolder(void)
BSTR src, dst, str, empty;
WCHAR buffW1[MAX_PATH],buffW2[MAX_PATH];
HRESULT hr;
+ HANDLE file;
get_temp_path(L"foo", buffW1);
get_temp_path(L"bar", buffW2);
@@ -2687,6 +2688,19 @@ static void test_MoveFolder(void)
ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
SysFreeString(src);
SysFreeString(dst);
+
+ file = CreateFileW(buffW1, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
+ FILE_ATTRIBUTE_NORMAL, NULL);
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n");
+ CloseHandle(file);
+
+ src = SysAllocString(buffW1);
+ dst = SysAllocString(buffW2);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst); /* src is regular file */
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
+ DeleteFileW(buffW1);
}
static void test_DoOpenPipeStream(void)
--
2.43.0

View File

@@ -1,111 +0,0 @@
From 30c175a9e90bc7889f97ad54ae82a34a832650dc Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Wed, 29 Jun 2022 17:21:10 +0200
Subject: [PATCH] scrrun: Move source dir into destination dir if destination
ends with separator in MoveFolder().
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/filesystem.c | 22 +++++++++++++++-----
dlls/scrrun/tests/filesystem.c | 38 +++++++++++++++++++++++++++++++++-
2 files changed, 54 insertions(+), 6 deletions(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index 72a15aae545..2c364ec6e08 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3820,18 +3820,30 @@ static inline HRESULT create_movefolder_error(DWORD err)
static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR destination)
{
- int len;
- WCHAR src_path[MAX_PATH];
+ int src_len, dst_len;
+ WCHAR src_path[MAX_PATH], dst_path[MAX_PATH];
+ WCHAR *filename;
TRACE("%p %s %s\n", iface, debugstr_w(source), debugstr_w(destination));
if(!source || !source[0] || !destination || !destination[0])
return E_INVALIDARG;
- len = SysStringLen(source);
- lstrcpyW(src_path, source);
- if (source[len-1] != '\\' && source[len-1] != '/') wcscat(src_path, L"\\");
+ if (!GetFullPathNameW(source, MAX_PATH, src_path, &filename))
+ return E_FAIL;
+ src_len = SysStringLen(src_path);
+ if (src_path[src_len-1] != '\\' && src_path[src_len-1] != '/')
+ wcscat(src_path, L"\\");
+
+ dst_len = lstrlenW(destination);
+ if (destination[dst_len-1] == '\\' || destination[dst_len-1] == '/') {
+ lstrcpyW(dst_path, destination);
+ lstrcatW(dst_path, filename);
+ TRACE("move %s to %s\n", debugstr_w(src_path), debugstr_w(dst_path));
+ return MoveFileW(src_path, dst_path) ? S_OK : create_movefolder_error(GetLastError());
+ }
+ TRACE("move %s to %s\n", debugstr_w(src_path), debugstr_w(destination));
return MoveFileW(src_path, destination) ? S_OK : create_movefolder_error(GetLastError());
}
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 0236a02aa74..d237e21e9a6 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2642,7 +2642,7 @@ static void test_MoveFile(void)
static void test_MoveFolder(void)
{
BSTR src, dst, str, empty;
- WCHAR buffW1[MAX_PATH],buffW2[MAX_PATH];
+ WCHAR buffW1[MAX_PATH],buffW2[MAX_PATH],pathW[MAX_PATH];
HRESULT hr;
HANDLE file;
@@ -2701,6 +2701,42 @@ static void test_MoveFolder(void)
SysFreeString(src);
SysFreeString(dst);
DeleteFileW(buffW1);
+
+ GetTempPathW(MAX_PATH, buffW1);
+ lstrcatW(buffW1,L"foo");
+ GetTempPathW(MAX_PATH, buffW2);
+ lstrcatW(buffW2,L"bar");
+ ok(CreateDirectoryW(buffW1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW1));
+ ok(CreateDirectoryW(buffW2, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW2));
+ lstrcpyW(pathW,buffW2);
+ lstrcatW(pathW,L"\\");
+ src = SysAllocString(buffW1);
+ dst = SysAllocString(pathW);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
+ lstrcatW(pathW,L"foo");
+ ok(RemoveDirectoryW(pathW), "can't remove %s directory\n", wine_dbgstr_w(pathW));
+ ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
+
+ GetTempPathW(MAX_PATH, buffW1);
+ lstrcatW(buffW1,L"foo");
+ GetTempPathW(MAX_PATH, buffW2);
+ lstrcatW(buffW2,L"bar");
+ ok(CreateDirectoryW(buffW1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW1));
+ ok(CreateDirectoryW(buffW2, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW2));
+ lstrcpyW(pathW,buffW2);
+ lstrcatW(pathW,L"/");
+ src = SysAllocString(buffW1);
+ dst = SysAllocString(pathW);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
+ lstrcatW(pathW,L"foo");
+ ok(RemoveDirectoryW(pathW), "can't remove %s directory\n", wine_dbgstr_w(pathW));
+ ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
}
static void test_DoOpenPipeStream(void)
--
2.43.0

View File

@@ -1,131 +0,0 @@
From 870d98b28ca3ff52c21feedfb3b1e5f3d6ade7b9 Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Wed, 29 Jun 2022 17:40:58 +0200
Subject: [PATCH] scrrun: Support wildcards in MoveFolder().
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/filesystem.c | 49 ++++++++++++++++++++++++++--------
dlls/scrrun/tests/filesystem.c | 27 ++++++++++++++++++-
2 files changed, 64 insertions(+), 12 deletions(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index 2c364ec6e08..749a06739c7 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3820,9 +3820,12 @@ static inline HRESULT create_movefolder_error(DWORD err)
static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR destination)
{
- int src_len, dst_len;
+ int src_len, dst_len, name_len;
WCHAR src_path[MAX_PATH], dst_path[MAX_PATH];
WCHAR *filename;
+ WIN32_FIND_DATAW ffd;
+ HANDLE f;
+ BOOL wildcard = FALSE, separator = FALSE;
TRACE("%p %s %s\n", iface, debugstr_w(source), debugstr_w(destination));
@@ -3832,19 +3835,43 @@ static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR
if (!GetFullPathNameW(source, MAX_PATH, src_path, &filename))
return E_FAIL;
- src_len = SysStringLen(src_path);
- if (src_path[src_len-1] != '\\' && src_path[src_len-1] != '/')
- wcscat(src_path, L"\\");
+ if (wcspbrk(filename,L"*?"))
+ wildcard = TRUE;
dst_len = lstrlenW(destination);
- if (destination[dst_len-1] == '\\' || destination[dst_len-1] == '/') {
- lstrcpyW(dst_path, destination);
- lstrcatW(dst_path, filename);
- TRACE("move %s to %s\n", debugstr_w(src_path), debugstr_w(dst_path));
- return MoveFileW(src_path, dst_path) ? S_OK : create_movefolder_error(GetLastError());
+ if (destination[dst_len-1] == '\\' || destination[dst_len-1] == '/')
+ separator = TRUE;
+
+ if (!wildcard && !separator) {
+ src_len = SysStringLen(src_path);
+ if (src_path[src_len-1] != '\\' && src_path[src_len-1] != '/')
+ wcscat(src_path, L"\\");
+ TRACE("move %s to %s\n", debugstr_w(src_path), debugstr_w(destination));
+ return MoveFileW(src_path, destination) ? S_OK : create_movefolder_error(GetLastError());
}
- TRACE("move %s to %s\n", debugstr_w(src_path), debugstr_w(destination));
- return MoveFileW(src_path, destination) ? S_OK : create_movefolder_error(GetLastError());
+
+ memcpy(dst_path, destination, dst_len*sizeof(WCHAR));
+ if (!separator)
+ dst_path[dst_len++] = '\\';
+ src_len = filename - src_path;
+ f = FindFirstFileW(source, &ffd);
+ if(f == INVALID_HANDLE_VALUE)
+ return create_error(GetLastError());
+
+ do {
+ name_len = lstrlenW(ffd.cFileName);
+ if(src_len+name_len+1 >= MAX_PATH || dst_len+name_len+1 >= MAX_PATH) {
+ FindClose(f);
+ return E_FAIL;
+ }
+ memcpy(filename, ffd.cFileName, (name_len+1)*sizeof(WCHAR));
+ memcpy(dst_path + dst_len, ffd.cFileName, (name_len+1)*sizeof(WCHAR));
+ TRACE("move %s to %s\n", debugstr_w(src_path), debugstr_w(dst_path));
+ if (!MoveFileW(src_path, dst_path)) return create_error(GetLastError());
+ } while(FindNextFileW(f, &ffd));
+ FindClose(f);
+
+ return S_OK;
}
static inline HRESULT copy_file(const WCHAR *source, DWORD source_len,
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index d237e21e9a6..4f5f1b0a7b8 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2642,7 +2642,7 @@ static void test_MoveFile(void)
static void test_MoveFolder(void)
{
BSTR src, dst, str, empty;
- WCHAR buffW1[MAX_PATH],buffW2[MAX_PATH],pathW[MAX_PATH];
+ WCHAR buffW1[MAX_PATH], buffW2[MAX_PATH], pathW[MAX_PATH], srcW[MAX_PATH];
HRESULT hr;
HANDLE file;
@@ -2737,6 +2737,31 @@ static void test_MoveFolder(void)
lstrcatW(pathW,L"foo");
ok(RemoveDirectoryW(pathW), "can't remove %s directory\n", wine_dbgstr_w(pathW));
ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
+
+ GetTempPathW(MAX_PATH, buffW1);
+ lstrcatW(buffW1,L"foo1");
+ GetTempPathW(MAX_PATH, buffW2);
+ lstrcatW(buffW2,L"foo2");
+ GetTempPathW(MAX_PATH, srcW);
+ lstrcatW(srcW,L"foo?");
+ GetTempPathW(MAX_PATH, pathW);
+ lstrcatW(pathW,L"bar");
+ ok(CreateDirectoryW(buffW1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW1));
+ ok(CreateDirectoryW(buffW2, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW2));
+ ok(CreateDirectoryW(pathW, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(pathW));
+ src = SysAllocString(srcW);
+ dst = SysAllocString(pathW);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
+ lstrcpyW(buffW1,pathW);
+ lstrcatW(buffW1,L"\\foo1");
+ lstrcpyW(buffW2,pathW);
+ lstrcatW(buffW2,L"\\foo2");
+ ok(RemoveDirectoryW(buffW1), "can't remove %s directory\n", wine_dbgstr_w(buffW1));
+ ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
+ ok(RemoveDirectoryW(pathW), "can't remove %s directory\n", wine_dbgstr_w(pathW));
}
static void test_DoOpenPipeStream(void)
--
2.43.0

View File

@@ -1,81 +0,0 @@
From 58989b73e856ab5c757991fc61e4690afc70c59d Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Mon, 18 Jul 2022 11:53:08 +0200
Subject: [PATCH] scrrun: Move directories only in MoveFolder().
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
---
dlls/scrrun/filesystem.c | 8 ++++++--
dlls/scrrun/tests/filesystem.c | 10 +++++++++-
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index 749a06739c7..79cd3439ea2 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3860,14 +3860,18 @@ static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR
do {
name_len = lstrlenW(ffd.cFileName);
- if(src_len+name_len+1 >= MAX_PATH || dst_len+name_len+1 >= MAX_PATH) {
+ if(src_len+name_len+2 >= MAX_PATH || dst_len+name_len+1 >= MAX_PATH) {
FindClose(f);
return E_FAIL;
}
memcpy(filename, ffd.cFileName, (name_len+1)*sizeof(WCHAR));
+ wcscat(filename, L"\\");
memcpy(dst_path + dst_len, ffd.cFileName, (name_len+1)*sizeof(WCHAR));
TRACE("move %s to %s\n", debugstr_w(src_path), debugstr_w(dst_path));
- if (!MoveFileW(src_path, dst_path)) return create_error(GetLastError());
+ if (!MoveFileW(src_path, dst_path)) {
+ if (GetLastError() == ERROR_INVALID_NAME) continue;
+ return create_movefolder_error(GetLastError());
+ }
} while(FindNextFileW(f, &ffd));
FindClose(f);
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 4f5f1b0a7b8..1d6e7da921b 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2642,7 +2642,7 @@ static void test_MoveFile(void)
static void test_MoveFolder(void)
{
BSTR src, dst, str, empty;
- WCHAR buffW1[MAX_PATH], buffW2[MAX_PATH], pathW[MAX_PATH], srcW[MAX_PATH];
+ WCHAR buffW1[MAX_PATH], buffW2[MAX_PATH], buffW3[MAX_PATH], pathW[MAX_PATH], srcW[MAX_PATH];
HRESULT hr;
HANDLE file;
@@ -2742,6 +2742,8 @@ static void test_MoveFolder(void)
lstrcatW(buffW1,L"foo1");
GetTempPathW(MAX_PATH, buffW2);
lstrcatW(buffW2,L"foo2");
+ GetTempPathW(MAX_PATH, buffW3);
+ lstrcatW(buffW3,L"foo3");
GetTempPathW(MAX_PATH, srcW);
lstrcatW(srcW,L"foo?");
GetTempPathW(MAX_PATH, pathW);
@@ -2749,6 +2751,11 @@ static void test_MoveFolder(void)
ok(CreateDirectoryW(buffW1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW1));
ok(CreateDirectoryW(buffW2, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW2));
ok(CreateDirectoryW(pathW, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(pathW));
+ /* create a file, should not be moved by MoveFolder() */
+ file = CreateFileW(buffW3, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
+ FILE_ATTRIBUTE_NORMAL, NULL);
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n");
+ CloseHandle(file);
src = SysAllocString(srcW);
dst = SysAllocString(pathW);
hr = IFileSystem3_MoveFolder(fs3, src, dst);
@@ -2762,6 +2769,7 @@ static void test_MoveFolder(void)
ok(RemoveDirectoryW(buffW1), "can't remove %s directory\n", wine_dbgstr_w(buffW1));
ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
ok(RemoveDirectoryW(pathW), "can't remove %s directory\n", wine_dbgstr_w(pathW));
+ ok(DeleteFileW(buffW3), "can't remove %s\n", wine_dbgstr_w(buffW3));
}
static void test_DoOpenPipeStream(void)
--
2.43.0

View File

@@ -1,57 +0,0 @@
From c76079238f5cd3d4d2baf2ec037b4af38dcc084c Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Tue, 2 Aug 2022 22:19:10 +0200
Subject: [PATCH] scrrun: return path not found error if source ends with path
separator in MoveFolder().
---
dlls/scrrun/filesystem.c | 4 ++++
dlls/scrrun/tests/filesystem.c | 17 +++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index 79cd3439ea2..dd1c18ed406 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3832,6 +3832,10 @@ static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR
if(!source || !source[0] || !destination || !destination[0])
return E_INVALIDARG;
+ src_len = SysStringLen(source);
+ if (source[src_len-1] == '\\' || source[src_len-1] == '/')
+ return CTL_E_PATHNOTFOUND;
+
if (!GetFullPathNameW(source, MAX_PATH, src_path, &filename))
return E_FAIL;
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 1d6e7da921b..a5bc7964f2a 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2720,6 +2720,23 @@ static void test_MoveFolder(void)
ok(RemoveDirectoryW(pathW), "can't remove %s directory\n", wine_dbgstr_w(pathW));
ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
+ GetTempPathW(MAX_PATH, buffW1);
+ lstrcatW(buffW1,L"foo");
+ GetTempPathW(MAX_PATH, buffW2);
+ lstrcatW(buffW2,L"bar");
+ ok(CreateDirectoryW(buffW1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW1));
+ ok(CreateDirectoryW(buffW2, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(buffW2));
+ lstrcpyW(pathW,buffW1);
+ lstrcatW(pathW,L"\\");
+ src = SysAllocString(pathW);
+ dst = SysAllocString(buffW2);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst);
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
+ ok(RemoveDirectoryW(buffW1), "can't remove %s directory\n", wine_dbgstr_w(buffW1));
+ ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
+
GetTempPathW(MAX_PATH, buffW1);
lstrcatW(buffW1,L"foo");
GetTempPathW(MAX_PATH, buffW2);
--
2.43.0

View File

@@ -1,79 +0,0 @@
From 435f38808b5812571fa17f1da3f387c52d206b11 Mon Sep 17 00:00:00 2001
From: Robert Wilhelm <robert.wilhelm@gmx.net>
Date: Tue, 2 Aug 2022 22:31:17 +0200
Subject: [PATCH] scrrun: Return path not found error if no folders were moved
in MoveFolder().
---
dlls/scrrun/filesystem.c | 5 +++--
dlls/scrrun/tests/filesystem.c | 28 ++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index dd1c18ed406..af4521898a7 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -3825,7 +3825,7 @@ static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR
WCHAR *filename;
WIN32_FIND_DATAW ffd;
HANDLE f;
- BOOL wildcard = FALSE, separator = FALSE;
+ BOOL wildcard = FALSE, separator = FALSE, success = FALSE;
TRACE("%p %s %s\n", iface, debugstr_w(source), debugstr_w(destination));
@@ -3876,10 +3876,11 @@ static HRESULT WINAPI filesys_MoveFolder(IFileSystem3 *iface, BSTR source, BSTR
if (GetLastError() == ERROR_INVALID_NAME) continue;
return create_movefolder_error(GetLastError());
}
+ success = TRUE;
} while(FindNextFileW(f, &ffd));
FindClose(f);
- return S_OK;
+ return success ? S_OK : CTL_E_PATHNOTFOUND;
}
static inline HRESULT copy_file(const WCHAR *source, DWORD source_len,
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index a5bc7964f2a..8cd465f1454 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -2787,6 +2787,34 @@ static void test_MoveFolder(void)
ok(RemoveDirectoryW(buffW2), "can't remove %s directory\n", wine_dbgstr_w(buffW2));
ok(RemoveDirectoryW(pathW), "can't remove %s directory\n", wine_dbgstr_w(pathW));
ok(DeleteFileW(buffW3), "can't remove %s\n", wine_dbgstr_w(buffW3));
+
+ GetTempPathW(MAX_PATH, buffW1);
+ lstrcatW(buffW1,L"foo1");
+ GetTempPathW(MAX_PATH, buffW2);
+ lstrcatW(buffW2,L"foo2");
+ GetTempPathW(MAX_PATH, srcW);
+ lstrcatW(srcW,L"foo*");
+ GetTempPathW(MAX_PATH, pathW);
+ lstrcatW(pathW,L"bar");
+ ok(CreateDirectoryW(pathW, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(pathW));
+ /* create two files, should not be moved by MoveFolder() */
+ file = CreateFileW(buffW1, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
+ FILE_ATTRIBUTE_NORMAL, NULL);
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n");
+ CloseHandle(file);
+ file = CreateFileW(buffW2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
+ FILE_ATTRIBUTE_NORMAL, NULL);
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n");
+ CloseHandle(file);
+ src = SysAllocString(srcW);
+ dst = SysAllocString(pathW);
+ hr = IFileSystem3_MoveFolder(fs3, src, dst);
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
+ SysFreeString(src);
+ SysFreeString(dst);
+ ok(RemoveDirectoryW(pathW), "can't remove %s directory\n", wine_dbgstr_w(pathW));
+ ok(DeleteFileW(buffW1), "can't remove %s\n", wine_dbgstr_w(buffW1));
+ ok(DeleteFileW(buffW2), "can't remove %s\n", wine_dbgstr_w(buffW2));
}
static void test_DoOpenPipeStream(void)
--
2.43.0

View File

@@ -1,5 +0,0 @@
Fixes: [52128] scrrun: Implement IFileSystem3 MoveFolder.
# MR: https://gitlab.winehq.org/wine/wine/-/merge_requests/391/commits
# Other Reference
# https://gitlab.winehq.org/wine/wine/-/merge_requests/343

View File

@@ -1,4 +1,4 @@
From 8ce710ee30e95c93b36e4d5e9d4bcba8fd6f0493 Mon Sep 17 00:00:00 2001
From 68b654546c4ed9a7874e6ae8b25d7bb0cd6a1b9b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 15 Mar 2015 01:05:48 +0100
Subject: [PATCH] server: Fix handling of GetMessage after previous PeekMessage
@@ -10,9 +10,9 @@ Changes in v2:
Changes in v3:
* Fix remaining todo_wine.
---
dlls/user32/tests/msg.c | 32 ++++++++++++++++++--------
server/queue.c | 51 ++++++++++++++++++++++++++++++++++-------
2 files changed, 66 insertions(+), 17 deletions(-)
dlls/user32/tests/msg.c | 32 ++++++++++++++++++-------
server/queue.c | 53 ++++++++++++++++++++++++++++++++++-------
2 files changed, 68 insertions(+), 17 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 8671134f349..219cdd805f2 100644
@@ -93,7 +93,7 @@ index 8671134f349..219cdd805f2 100644
* because both messages are in the same queue. */
diff --git a/server/queue.c b/server/queue.c
index fb9499b5589..6b374797b42 100644
index 82d5a395957..e13c8e61c04 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -138,6 +138,7 @@ struct msg_queue
@@ -113,7 +113,7 @@ index fb9499b5589..6b374797b42 100644
list_init( &queue->send_result );
list_init( &queue->callback_result );
list_init( &queue->pending_timers );
@@ -812,13 +815,21 @@ static inline struct msg_queue *get_current_queue(void)
@@ -815,13 +818,21 @@ static inline struct msg_queue *get_current_queue(void)
}
/* get a (pseudo-)unique id to tag hardware messages */
@@ -136,7 +136,7 @@ index fb9499b5589..6b374797b42 100644
/* lookup an already queued mouse message that matches the message, window and type */
static struct message *find_mouse_message( struct thread_input *input, const struct message *msg )
{
@@ -1169,7 +1180,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
@@ -1172,7 +1183,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
}
/* retrieve a posted message */
@@ -145,7 +145,7 @@ index fb9499b5589..6b374797b42 100644
unsigned int first, unsigned int last, unsigned int flags,
struct get_message_reply *reply )
{
@@ -1180,6 +1191,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
@@ -1183,6 +1194,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
{
if (!match_window( win, msg->win )) continue;
if (!check_msg_filter( msg->msg, first, last )) continue;
@@ -153,7 +153,7 @@ index fb9499b5589..6b374797b42 100644
goto found; /* found one */
}
return 0;
@@ -1799,6 +1811,7 @@ found:
@@ -1791,6 +1803,7 @@ found:
msg->msg = WM_HOTKEY;
msg->wparam = hotkey->id;
msg->lparam = ((hotkey->vkey & 0xffff) << 16) | modifiers;
@@ -161,7 +161,7 @@ index fb9499b5589..6b374797b42 100644
free( msg->data );
msg->data = NULL;
@@ -2786,7 +2799,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
@@ -2773,7 +2786,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
}
/* now we can return it */
@@ -170,7 +170,7 @@ index fb9499b5589..6b374797b42 100644
reply->type = MSG_HARDWARE;
reply->win = win;
reply->msg = msg_code;
@@ -2925,6 +2938,7 @@ void send_notify_message( user_handle_t win, unsigned int message, lparam_t wpar
@@ -2913,6 +2926,7 @@ void send_notify_message( user_handle_t win, unsigned int message, lparam_t wpar
msg->result = NULL;
msg->data = NULL;
msg->data_size = 0;
@@ -178,7 +178,7 @@ index fb9499b5589..6b374797b42 100644
get_message_defaults( thread->queue, &msg->x, &msg->y, &msg->time );
@@ -3208,6 +3222,7 @@ DECL_HANDLER(send_message)
@@ -3198,6 +3212,7 @@ DECL_HANDLER(send_message)
set_queue_bits( recv_queue, QS_SENDMESSAGE );
break;
case MSG_POSTED:
@@ -186,7 +186,7 @@ index fb9499b5589..6b374797b42 100644
list_add_tail( &recv_queue->msg_list[POST_MESSAGE], &msg->entry );
set_queue_bits( recv_queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
if (msg->msg == WM_HOTKEY)
@@ -3348,12 +3363,12 @@ DECL_HANDLER(get_message)
@@ -3338,12 +3353,12 @@ DECL_HANDLER(get_message)
/* then check for posted messages */
if ((filter & QS_POSTMESSAGE) &&
@@ -201,7 +201,7 @@ index fb9499b5589..6b374797b42 100644
return;
/* only check for quit messages if not posted messages pending */
@@ -3364,7 +3379,7 @@ DECL_HANDLER(get_message)
@@ -3354,7 +3369,7 @@ DECL_HANDLER(get_message)
if ((filter & QS_INPUT) &&
filter_contains_hw_range( req->get_first, req->get_last ) &&
get_hardware_message( current, req->hw_id, get_win, req->get_first, req->get_last, req->flags, reply ))
@@ -210,7 +210,7 @@ index fb9499b5589..6b374797b42 100644
/* now check for WM_PAINT */
if ((filter & QS_PAINT) &&
@@ -3377,7 +3392,7 @@ DECL_HANDLER(get_message)
@@ -3367,7 +3382,7 @@ DECL_HANDLER(get_message)
reply->wparam = 0;
reply->lparam = 0;
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
@@ -219,10 +219,10 @@ index fb9499b5589..6b374797b42 100644
}
/* now check for timer */
@@ -3393,9 +3408,19 @@ DECL_HANDLER(get_message)
@@ -3381,9 +3396,21 @@ DECL_HANDLER(get_message)
reply->wparam = timer->id;
reply->lparam = timer->lparam;
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
if (!(req->flags & PM_NOYIELD) && current->process->idle_event)
set_event( current->process->idle_event );
- return;
+ goto found_msg;
}
@@ -237,10 +237,12 @@ index fb9499b5589..6b374797b42 100644
+ get_posted_message( queue, 0, get_win, WM_HOTKEY, WM_HOTKEY, req->flags, reply ))
+ return;
+
if (get_win == -1 && current->process->idle_event) set_event( current->process->idle_event );
+ if (get_win == -1 && current->process->idle_event) set_event( current->process->idle_event );
+
SHARED_WRITE_BEGIN( queue_shm, queue_shm_t )
@@ -3408,6 +3433,13 @@ DECL_HANDLER(get_message)
{
shared->wake_mask = req->wake_mask;
@@ -3394,6 +3421,13 @@ DECL_HANDLER(get_message)
if (!get_queue_status( queue )) reset_sync( queue->sync );
else signal_sync( queue->sync );
set_error( STATUS_PENDING ); /* FIXME */
@@ -254,7 +256,7 @@ index fb9499b5589..6b374797b42 100644
}
@@ -3425,7 +3457,10 @@ DECL_HANDLER(reply_message)
@@ -3411,7 +3445,10 @@ DECL_HANDLER(reply_message)
DECL_HANDLER(accept_hardware_message)
{
if (current->queue)

Some files were not shown because too many files have changed in this diff Show More