mirror of
https://github.com/reactos/reactos.git
synced 2025-03-01 03:45:16 +00:00
[WINESYNC] setupapi: Add support for IDF_CHECKFIRST flag in SetupPromptForDiskW.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=20465 Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 0422c6c4d0224c4e619771a0d22f4a5a1575f3f3 by Michael Müller <michael@fds-team.de>
This commit is contained in:
parent
2135ba933d
commit
d651c6290b
2 changed files with 28 additions and 1 deletions
|
@ -228,6 +228,33 @@ UINT WINAPI SetupPromptForDiskW(HWND hwndParent, PCWSTR DialogTitle, PCWSTR Disk
|
|||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return DPROMPT_CANCEL;
|
||||
}
|
||||
|
||||
if (PathToSource && (DiskPromptStyle & IDF_CHECKFIRST))
|
||||
{
|
||||
WCHAR filepath[MAX_PATH];
|
||||
|
||||
if (lstrlenW(PathToSource) + 1 + lstrlenW(FileSought) < ARRAY_SIZE(filepath))
|
||||
{
|
||||
swprintf(filepath, ARRAY_SIZE(filepath), L"%s\\%s", PathToSource, FileSought);
|
||||
if (GetFileAttributesW(filepath) != INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
if (PathRequiredSize)
|
||||
*PathRequiredSize = lstrlenW(PathToSource) + 1;
|
||||
|
||||
if (!PathBuffer)
|
||||
return DPROMPT_SUCCESS;
|
||||
|
||||
if (PathBufferSize >= lstrlenW(PathToSource) + 1)
|
||||
{
|
||||
lstrcpyW(PathBuffer, PathToSource);
|
||||
return DPROMPT_SUCCESS;
|
||||
}
|
||||
else
|
||||
return DPROMPT_BUFFERTOOSMALL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
params.DialogTitle = DialogTitle;
|
||||
params.DiskName = DiskName;
|
||||
params.PathToSource = PathToSource;
|
||||
|
|
|
@ -10,4 +10,4 @@ files:
|
|||
dlls/setupapi/setupcab.c: dll/win32/setupapi/setupcab.c
|
||||
dlls/setupapi/stringtable.c: dll/win32/setupapi/stringtable_wine.c
|
||||
tags:
|
||||
wine: dc968dae42e3b3162e2767ed32b0f91ae9b23ad3
|
||||
wine: 0422c6c4d0224c4e619771a0d22f4a5a1575f3f3
|
||||
|
|
Loading…
Reference in a new issue