From: Paul Gofman <pgofman(a)codeweavers.com> --- dlls/msi/media.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/msi/media.c b/dlls/msi/media.c index 6aeb948de51..6703d8d8e05 100644 --- a/dlls/msi/media.c +++ b/dlls/msi/media.c @@ -468,10 +468,13 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint, msi_free( tmppathW ); return ERROR_OUTOFMEMORY; } + + msi_disable_fs_redirection( data->package ); if (!GetTempFileNameW(tmppathW, L"msi", 0, tmpfileW)) tmpfileW[0] = 0; msi_free( tmppathW ); handle = CreateFileW(tmpfileW, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, attrs, NULL); + msi_revert_fs_redirection( data->package ); if (handle != INVALID_HANDLE_VALUE && msi_move_file( data->package, path, NULL, MOVEFILE_DELAY_UNTIL_REBOOT ) && @@ -482,7 +485,9 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint, else { WARN( "failed to schedule rename operation %s (error %lu)\n", debugstr_w(path), GetLastError() ); + msi_disable_fs_redirection( data->package ); DeleteFileW( tmpfileW ); + msi_revert_fs_redirection( data->package ); } msi_free(tmpfileW); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/945