setupapi: Initialization fix

Andrew Talbot andrew.talbot at talbotville.com
Tue Mar 24 14:54:07 CDT 2009


The TRACE() potentially reporting the value of "newpath" must be placed after
where that variable is first set.

-- Andy.
---
Changelog:
    setupapi: Initialization fix.

diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c
index 6c9ca64..d959201 100644
--- a/dlls/setupapi/queue.c
+++ b/dlls/setupapi/queue.c
@@ -1273,19 +1273,19 @@ BOOL WINAPI SetupCommitFileQueueW( HWND owner, HSPFILEQ handle, PSP_FILE_CALLBAC
             if (op_result == FILEOP_NEWPATH) op_result = FILEOP_DOIT;
             while (op_result == FILEOP_DOIT || op_result == FILEOP_NEWPATH)
             {
+                if (op->dst_path)
+                {
+                    if (!create_full_pathW( op->dst_path ))
+                    {
+                        paths.Win32Error = GetLastError();
+                        op_result = handler( context, SPFILENOTIFY_COPYERROR,
+                                             (UINT_PTR)&paths, (UINT_PTR)newpath );
+                        if (op_result == FILEOP_ABORT) goto done;
+                    }
+                }
                 TRACE( "copying file %s -> %s\n",
                        debugstr_w( op_result == FILEOP_NEWPATH ? newpath : paths.Source ),
                        debugstr_w(paths.Target) );
-                if (op->dst_path)
-		{
-		    if (!create_full_pathW( op->dst_path ))
-		    {
-			paths.Win32Error = GetLastError();
-			op_result = handler( context, SPFILENOTIFY_COPYERROR,
-					     (UINT_PTR)&paths, (UINT_PTR)newpath );
-			if (op_result == FILEOP_ABORT) goto done;
-		    }
-		}
                 if (do_file_copyW( op_result == FILEOP_NEWPATH ? newpath : paths.Source,
                                paths.Target, op->style, handler, context )) break;  /* success */
                 /* try to extract it from the cabinet file */



More information about the wine-patches mailing list