[FASTFAT] When a file gets overwritten, notify about the changes

This commit is contained in:
Pierre Schweitzer 2018-01-07 11:44:25 +01:00
parent ffeb3f070b
commit 2a36b632ef
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -1013,6 +1013,19 @@ VfatCreateFile(
FILE_ACTION_ADDED,
NULL);
}
else if (Irp->IoStatus.Information == FILE_OVERWRITTEN ||
Irp->IoStatus.Information == FILE_SUPERSEDED)
{
FsRtlNotifyFullReportChange(DeviceExt->NotifySync,
&(DeviceExt->NotifyList),
(PSTRING)&pFcb->PathNameU,
pFcb->PathNameU.Length - pFcb->LongNameU.Length,
NULL,
NULL,
FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_SIZE,
FILE_ACTION_MODIFIED,
NULL);
}
pFcb->OpenHandleCount++;
DeviceExt->OpenHandleCount++;