[WINESYNC]: revert wine-staging patchset for setupapi

This commit is contained in:
winesync 2023-12-29 16:18:49 +01:00 committed by Hermès Bélusca-Maïto
parent 8422291724
commit fc5612c3b7
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 0 additions and 1177 deletions

View file

@ -1,57 +0,0 @@
From e53b61c73dfb02450206ace1f7c9e90734344991 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?=
<hermes.belusca-maito@reactos.org>
Date: Wed, 6 Sep 2023 21:59:48 +0200
Subject: [PATCH 1/3] wine-staging 4.0 setupapi dll
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
---
dll/win32/setupapi/dialog.c | 29 ++
1 files changed, 29 insertions(+)
diff --git a/dll/win32/setupapi/dialog.c b/dll/win32/setupapi/dialog.c
index fc74cfc1727..4c4f8c6a840 100644
--- a/dll/win32/setupapi/dialog.c
+++ b/dll/win32/setupapi/dialog.c
@@ -243,6 +243,35 @@ UINT WINAPI SetupPromptForDiskW(HWND hwndParent, PCWSTR DialogTitle, PCWSTR Disk
SetLastError(ERROR_INVALID_PARAMETER);
return DPROMPT_CANCEL;
}
+
+ if (PathToSource && (DiskPromptStyle & IDF_CHECKFIRST))
+ {
+ static const WCHAR format[] = {'%', 's', '\\', '%', 's', '\0'};
+ WCHAR filepath[MAX_PATH];
+
+ if (strlenW(PathToSource) + 1 + strlenW(FileSought) < sizeof(filepath))
+ {
+ snprintfW(filepath, MAX_PATH, format, PathToSource, FileSought);
+
+ if (GetFileAttributesW(filepath) != INVALID_FILE_ATTRIBUTES)
+ {
+ if (PathRequiredSize)
+ *PathRequiredSize = strlenW(PathToSource) + 1;
+
+ if (!PathBuffer)
+ return DPROMPT_SUCCESS;
+
+ if (PathBufferSize >= strlenW(PathToSource) + 1)
+ {
+ strcpyW(PathBuffer, PathToSource);
+ return DPROMPT_SUCCESS;
+ }
+ else
+ return DPROMPT_BUFFERTOOSMALL;
+ }
+ }
+ }
+
params.DialogTitle = DialogTitle;
params.DiskName = DiskName;
params.PathToSource = PathToSource;
--
2.36.1.windows.1