Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- programs/dpinst/dpinst.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/programs/dpinst/dpinst.c b/programs/dpinst/dpinst.c index afcadffec53..f883dcb8689 100644 --- a/programs/dpinst/dpinst.c +++ b/programs/dpinst/dpinst.c @@ -260,6 +260,7 @@ static void install_driver(const struct copy_context *copy_ctx, const WCHAR *dri static void install_inf(const WCHAR *root, const WCHAR *filename) { WCHAR version[LINE_LEN], mfg_key[LINE_LEN], manufacturer[LINE_LEN]; + SP_FILE_COPY_PARAMS_W params = {0}; struct copy_context copy_ctx; WCHAR *filename_abs; void *default_ctx; @@ -310,6 +311,26 @@ static void install_inf(const WCHAR *root, const WCHAR *filename) install_driver(©_ctx, get_string_field(&ctx, 1)); }
+ params.cbSize = sizeof(params); + params.QueueHandle = copy_ctx.queue; + params.SourceRootPath = copy_ctx.src_root; + params.SourceFilename = filename; + params.TargetDirectory = copy_ctx.dst_root; + params.TargetFilename = filename; + params.CopyStyle = SP_COPY_NODECOMP; + if (!SetupQueueCopyIndirectW(¶ms)) + ERR("Failed to queue copy, error %lu.\n", GetLastError()); + + if (SetupFindFirstLineW(copy_ctx.hinf, L"Version", L"CatalogFile", &ctx) + && (params.SourceFilename = get_string_field(&ctx, 1))) + { + TRACE("Copying catalog file %s.\n", debugstr_w(params.SourceFilename)); + + params.TargetFilename = params.SourceFilename; + if (!SetupQueueCopyIndirectW(¶ms)) + ERR("Failed to queue copy, error %lu.\n", GetLastError()); + } + default_ctx = SetupInitDefaultQueueCallback(NULL); if (!SetupCommitFileQueueW(NULL, copy_ctx.queue, SetupDefaultQueueCallbackW, default_ctx)) ERR("Failed to commit queue, error %lu.\n", GetLastError());