From a7d02a1f08194accdd3714a82bac19298c5c9fde Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Wed, 2 Apr 2008 17:41:47 -0500 Subject: [PATCH] msi: Handle the case where no files match the wildcard in MoveFiles. --- dlls/msi/action.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 982c9f09fa0..b19e01508b5 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -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;