msi: Handle the case where no files match the wildcard in MoveFiles.

This commit is contained in:
James Hawkins 2008-04-02 17:41:47 -05:00 committed by Alexandre Julliard
parent cfeca053b8
commit a7d02a1f08
1 changed files with 4 additions and 0 deletions

View 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;