[RAPPS] Don't delete downloaded ZIP/CAB even if configured to (#7791)

This commit is contained in:
Whindmar Saksit 2025-03-20 14:32:07 +01:00 committed by GitHub
parent 7f49ae633b
commit 7dc7b866b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 78 additions and 3 deletions

View file

@ -1115,7 +1115,14 @@ end:
if (bTempfile)
{
if (bCancelled || (SettingsInfo.bDelInstaller && Info.DLType == DLTYPE_APPLICATION))
DeleteFileW(Path);
{
// Don't delete .zip/.cab files so the user can extract from them
if (bCancelled || Info.IType == INSTALLER_GENERATE || !OpensWithExplorer(Path) ||
HIBYTE(ClassifyFile(Path)) != PERCEIVED_TYPE_COMPRESSED)
{
DeleteFileW(Path);
}
}
}
SendMessageW(hDlg, WM_SETSTATUS, DLSTATUS_FINISHED, 0);