diff --git a/dlls/msi/files.c b/dlls/msi/files.c index ec46ae3318f..62e5f43606f 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -843,7 +843,13 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param ) { if (!wildcards) { - destname = strdupW(sourcename); + WCHAR *p; + if (sourcename) + destname = strdupW(sourcename); + else if ((p = strrchrW(sourcedir, '\\'))) + destname = strdupW(p + 1); + else + destname = strdupW(sourcedir); if (!destname) goto done; }