ExtendedTools: Add warnings when deleting reparse points (Fixes
*
* Authors:
*
- * dmex 2020-2022
+ * dmex 2020-2023
*
*/
@@ -48,8 +48,8 @@ typedef struct _REPARSE_LISTVIEW_ENTRY
#define FILE_LAYOUT_ENTRY_VERSION 0x1
#define STREAM_LAYOUT_ENTRY_VERSION 0x1
#define PH_FIRST_LAYOUT_ENTRY(LayoutEntry) \
- ((PFILE_LAYOUT_ENTRY)(PTR_ADD_OFFSET(LayoutEntry, \
- ((PQUERY_FILE_LAYOUT_OUTPUT)LayoutEntry)->FirstFileOffset)))
+ ((PFILE_LAYOUT_ENTRY)(PTR_ADD_OFFSET((LayoutEntry), \
+ ((PQUERY_FILE_LAYOUT_OUTPUT)(LayoutEntry))->FirstFileOffset)))
#define PH_NEXT_LAYOUT_ENTRY(LayoutEntry) ( \
((PFILE_LAYOUT_ENTRY)(LayoutEntry))->NextFileOffset ? \
(PFILE_LAYOUT_ENTRY)(PTR_ADD_OFFSET((LayoutEntry), \
@@ -1481,6 +1481,14 @@ 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;
@@ -1495,8 +1503,17 @@ 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;
@@ -1511,6 +1528,7 @@ INT_PTR CALLBACK EtReparseDlgProc(
PhShowStatus(hwndDlg, L"Unable to remove the object identifier.", status, 0);
}
}
+ }
break;
case ID_REPARSE_SDDL:
{
