Commit 52f3d5be authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Remove child folders first in the RemoveFolders action.

parent 2e5bf9ca
......@@ -884,6 +884,20 @@ static UINT ACTION_CreateFolders(MSIPACKAGE *package)
return rc;
}
static void remove_persistent_folder( MSIFOLDER *folder )
{
FolderList *fl;
LIST_FOR_EACH_ENTRY( fl, &folder->children, FolderList, entry )
{
remove_persistent_folder( fl->folder );
}
if (folder->persistent && folder->State != FOLDER_STATE_REMOVED)
{
if (RemoveDirectoryW( folder->ResolvedTarget )) folder->State = FOLDER_STATE_REMOVED;
}
}
static UINT ITERATE_RemoveFolders( MSIRECORD *row, LPVOID param )
{
MSIPACKAGE *package = param;
......@@ -927,9 +941,8 @@ static UINT ITERATE_RemoveFolders( MSIRECORD *row, LPVOID param )
msi_ui_actiondata( package, szRemoveFolders, uirow );
msiobj_release( &uirow->hdr );
RemoveDirectoryW( full_path );
folder = msi_get_loaded_folder( package, dir );
folder->State = FOLDER_STATE_REMOVED;
remove_persistent_folder( folder );
return ERROR_SUCCESS;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment