From 2a36b632ef2c6d1c39d89cc305f114c289a96b30 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 7 Jan 2018 11:44:25 +0100 Subject: [PATCH] [FASTFAT] When a file gets overwritten, notify about the changes --- drivers/filesystems/fastfat/create.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/filesystems/fastfat/create.c b/drivers/filesystems/fastfat/create.c index b9acc7f1c3f..1ba61fdd385 100644 --- a/drivers/filesystems/fastfat/create.c +++ b/drivers/filesystems/fastfat/create.c @@ -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++;