ExtendedTools: Fix showing multiple warnings when removing multiple objects
@@ -1574,6 +1574,45 @@ INT_PTR CALLBACK EtReparseDlgProc(
{
case 1:
{
+ BOOLEAN delete = TRUE;
+
+ switch (context->MenuItemIndex)
+ {
+ case ID_REPARSE_POINTS:
+ {
+ if (PhGetIntegerSetting(L"EnableWarnings") && !PhShowConfirmMessage(
+ hwndDlg,
+ L"remove",
+ L"the repase point",
+ L"The repase point will be permanently deleted.",
+ FALSE
+ ))
+ {
+ delete = FALSE;
+ break;
+ }
+ }
+ break;
+ case ID_REPARSE_OBJID:
+ {
+ if (PhGetIntegerSetting(L"EnableWarnings") && !PhShowConfirmMessage(
+ hwndDlg,
+ L"remove",
+ L"the object identifier",
+ L"The object identifier will be permanently deleted.",
+ FALSE
+ ))
+ {
+ delete = FALSE;
+ break;
+ }
+ }
+ break;
+ }
+
+ if (!delete)
+ break;
+
ExtendedListView_SetRedraw(context->ListViewHandle, FALSE);
for (ULONG i = 0; i < numberOfItems; i++)
@@ -1586,14 +1625,6 @@ INT_PTR CALLBACK EtReparseDlgProc(
switch (context->MenuItemIndex)
{
case ID_REPARSE_POINTS:
- {
- if (!PhGetIntegerSetting(L"EnableWarnings") || PhShowConfirmMessage(
- hwndDlg,
- L"remove",
- L"the repase point",
- L"The repase point will be permanently deleted.",
- FALSE
- ))
{
NTSTATUS status;
@@ -1608,17 +1639,8 @@ INT_PTR CALLBACK EtReparseDlgProc(
PhShowStatus(hwndDlg, L"Unable to remove the reparse point.", status, 0);
}
}
- }
break;
case ID_REPARSE_OBJID:
- {
- if (!PhGetIntegerSetting(L"EnableWarnings") || PhShowConfirmMessage(
- hwndDlg,
- L"remove",
- L"the object identifier",
- L"The object identifier will be permanently deleted.",
- FALSE
- ))
{
NTSTATUS status;
@@ -1633,7 +1655,6 @@ INT_PTR CALLBACK EtReparseDlgProc(
PhShowStatus(hwndDlg, L"Unable to remove the object identifier.", status, 0);
}
}
- }
break;
case ID_REPARSE_SDDL:
{
