Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/setupapi/tests/install.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c index f9e55929f2..d761f89103 100644 --- a/dlls/setupapi/tests/install.c +++ b/dlls/setupapi/tests/install.c @@ -1903,6 +1903,7 @@ static void test_need_media(void) queue = SetupOpenFileQueue(); ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); copy_params.LayoutInf = hinf; + copy_params.QueueHandle = queue; /* In fact this fails with ERROR_INVALID_PARAMETER on 8+. */ if (SetupQueueCopyIndirectA(©_params)) {
Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/setupapi/queue.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c index ba750b0ba8..e049bbe209 100644 --- a/dlls/setupapi/queue.c +++ b/dlls/setupapi/queue.c @@ -1408,13 +1408,20 @@ BOOL WINAPI SetupCommitFileQueueW( HWND owner, HSPFILEQ handle, PSP_FILE_CALLBAC * actually isn't in a subdirectory, but keep track of what it * was, and then later strip it from the root path that we * ultimately resolve the source disk to. */ - WCHAR *src_path = op->src_path; + WCHAR src_path[MAX_PATH]; + size_t path_len = 0;
- op->src_path = NULL; - if (src_path) + src_path[0] = 0; + if (op->src_path) { + lstrcpyW(src_path, op->src_path); + path_len = lstrlenW(src_path); + lstrcatW(op->media->root, backslashW); - lstrcatW(op->media->root, src_path); + lstrcatW(op->media->root, op->src_path); + + heap_free(op->src_path); + op->src_path = NULL; }
for (;;) @@ -1450,12 +1457,11 @@ BOOL WINAPI SetupCommitFileQueueW( HWND owner, HSPFILEQ handle, PSP_FILE_CALLBAC
if (queue_copy_file( paths.Source, paths.Target, op, handler, context )) { - if (src_path && !op->media->cabinet) + if (path_len > 0 && !op->media->cabinet) { - size_t root_len = lstrlenW(op->media->root), path_len = lstrlenW(src_path); + size_t root_len = lstrlenW(op->media->root); if (path_len <= root_len && !wcsnicmp(op->media->root + root_len - path_len, src_path, path_len)) op->media->root[root_len - path_len - 1] = 0; - heap_free( src_path ); } op->media->resolved = TRUE; handler( context, SPFILENOTIFY_ENDCOPY, (UINT_PTR)&paths, 0 );
Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/setupapi/queue.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c index e049bbe209..e9b48ed1c2 100644 --- a/dlls/setupapi/queue.c +++ b/dlls/setupapi/queue.c @@ -196,6 +196,7 @@ UINT CALLBACK QUEUE_callback_WtoA( void *context, UINT notification, switch(notification) { case SPFILENOTIFY_COPYERROR: + buffer[0] = 0; param2 = (UINT_PTR)buffer; /* fall through */ case SPFILENOTIFY_STARTDELETE:
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=55557
Your paranoid android.
=== wvistau64 (task log) ===
Task errors: The previous 1 run(s) terminated abnormally
=== wvistau64_he (task log) ===
Task errors: The previous 1 run(s) terminated abnormally