msi: Handle the case where no files match the wildcard in MoveFiles.
authorJames Hawkins <jhawkins@codeweavers.com>
Wed, 2 Apr 2008 22:41:47 +0000 (17:41 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 3 Apr 2008 09:29:53 +0000 (11:29 +0200)
dlls/msi/action.c

index 982c9f09fa0f7c6c004955d84822755fffe5e83f..b19e01508b565b1f3417bf5c9389a0262ac4fdac 100644 (file)
@@ -5413,6 +5413,10 @@ static BOOL move_files_wildcard(LPWSTR source, LPWSTR dest, int options)
         msi_free(path);
     }
 
+    /* no files match the wildcard */
+    if (list_empty(&files.entry))
+        goto done;
+
     /* only the first wildcard match gets renamed to dest */
     file = LIST_ENTRY(list_head(&files.entry), FILE_LIST, entry);
     size = (strrchrW(file->dest, '\\') - file->dest) + lstrlenW(file->destname) + 2;