From cb87e96df612b009ab0275fd45bb058bfdbdd012 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Tue, 11 Mar 2014 07:22:28 +0000 Subject: [PATCH] [FASTFAT] Add support for more notifications on file modification. CORE-2582 svn path=/trunk/; revision=62471 --- reactos/drivers/filesystems/fastfat/rw.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/reactos/drivers/filesystems/fastfat/rw.c b/reactos/drivers/filesystems/fastfat/rw.c index 7cdd511536c..7474c5ba348 100644 --- a/reactos/drivers/filesystems/fastfat/rw.c +++ b/reactos/drivers/filesystems/fastfat/rw.c @@ -1000,6 +1000,8 @@ VfatWrite( if(!(*Fcb->Attributes & FILE_ATTRIBUTE_DIRECTORY)) { LARGE_INTEGER SystemTime; + ULONG Filter; + // set dates and times KeQuerySystemTime (&SystemTime); if (Fcb->Flags & FCB_IS_FATX_ENTRY) @@ -1019,6 +1021,20 @@ VfatWrite( } /* set date and times to dirty */ Fcb->Flags |= FCB_IS_DIRTY; + + /* Time to notify the OS */ + Filter = FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_ATTRIBUTES; + if (ByteOffset.QuadPart != OldFileSize.QuadPart) Filter |= FILE_NOTIFY_CHANGE_SIZE; + + FsRtlNotifyFullReportChange(IrpContext->DeviceExt->NotifySync, + &(IrpContext->DeviceExt->NotifyList), + (PSTRING)&Fcb->PathNameU, + Fcb->PathNameU.Length - Fcb->LongNameU.Length, + NULL, + NULL, + Filter, + FILE_ACTION_MODIFIED, + NULL); } }