Skip to content

Commit

Permalink
MDEV-30374 Windows, MSI - do not cache error, if install directory ch…
Browse files Browse the repository at this point in the history
…anges.

If installation directory is not empty, MSI would shows a popup informing
user about it. The error message is stored as MSI property
INSTALLDIRERROR.

Fixed the bug that the error was not cleared, when the user changes
directory in installer UI.
  • Loading branch information
vaintroub committed Jan 12, 2023
1 parent 56c9b0b commit 5aa58a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions win/packaging/ca/CustomAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ extern "C" UINT __stdcall CheckInstallDirectory(MSIHANDLE hInstall)
swprintf(msg,countof(msg), L"Installation directory '%s' exists and is not empty. Choose a "
"different install directory",path);
WcaSetProperty(L"INSTALLDIRERROR", msg);
goto LExit;
}

WcaSetProperty(L"INSTALLDIRERROR", L"");

LExit:
ReleaseStr(path);
return WcaFinalize(er);
Expand Down

0 comments on commit 5aa58a0

Please sign in to comment.