Author: pschweitzer
Date: Thu Sep 21 09:47:13 2017
New Revision: 75918
URL:
http://svn.reactos.org/svn/reactos?rev=75918&view=rev
Log:
[FASTFAT]
Notify in case of attributes/dates changes
Modified:
trunk/reactos/drivers/filesystems/fastfat/finfo.c
Modified: trunk/reactos/drivers/filesystems/fastfat/finfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/finfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/finfo.c [iso-8859-1] Thu Sep 21 09:47:13
2017
@@ -156,6 +156,8 @@
PDEVICE_EXTENSION DeviceExt,
PFILE_BASIC_INFORMATION BasicInfo)
{
+ ULONG NotifyFilter;
+
DPRINT("VfatSetBasicInformation()\n");
ASSERT(NULL != FileObject);
@@ -165,6 +167,8 @@
/* Check volume label bit */
ASSERT(0 == (*FCB->Attributes & _A_VOLID));
+ NotifyFilter = 0;
+
if (BasicInfo->FileAttributes != 0)
{
UCHAR Attributes;
@@ -192,6 +196,7 @@
{
*FCB->Attributes = Attributes;
DPRINT("Setting attributes 0x%02x\n", *FCB->Attributes);
+ NotifyFilter |= FILE_NOTIFY_CHANGE_ATTRIBUTES;
}
}
@@ -203,6 +208,7 @@
&BasicInfo->CreationTime,
&FCB->entry.FatX.CreationDate,
&FCB->entry.FatX.CreationTime);
+ NotifyFilter |= FILE_NOTIFY_CHANGE_CREATION;
}
if (BasicInfo->LastAccessTime.QuadPart != 0 &&
BasicInfo->LastAccessTime.QuadPart != -1)
@@ -211,6 +217,7 @@
&BasicInfo->LastAccessTime,
&FCB->entry.FatX.AccessDate,
&FCB->entry.FatX.AccessTime);
+ NotifyFilter |= FILE_NOTIFY_CHANGE_LAST_ACCESS;
}
if (BasicInfo->LastWriteTime.QuadPart != 0 &&
BasicInfo->LastWriteTime.QuadPart != -1)
@@ -219,6 +226,7 @@
&BasicInfo->LastWriteTime,
&FCB->entry.FatX.UpdateDate,
&FCB->entry.FatX.UpdateTime);
+ NotifyFilter |= FILE_NOTIFY_CHANGE_LAST_WRITE;
}
}
else
@@ -229,6 +237,7 @@
&BasicInfo->CreationTime,
&FCB->entry.Fat.CreationDate,
&FCB->entry.Fat.CreationTime);
+ NotifyFilter |= FILE_NOTIFY_CHANGE_CREATION;
}
if (BasicInfo->LastAccessTime.QuadPart != 0 &&
BasicInfo->LastAccessTime.QuadPart != -1)
@@ -237,6 +246,7 @@
&BasicInfo->LastAccessTime,
&FCB->entry.Fat.AccessDate,
NULL);
+ NotifyFilter |= FILE_NOTIFY_CHANGE_LAST_ACCESS;
}
if (BasicInfo->LastWriteTime.QuadPart != 0 &&
BasicInfo->LastWriteTime.QuadPart != -1)
@@ -245,10 +255,21 @@
&BasicInfo->LastWriteTime,
&FCB->entry.Fat.UpdateDate,
&FCB->entry.Fat.UpdateTime);
+ NotifyFilter |= FILE_NOTIFY_CHANGE_LAST_WRITE;
}
}
VfatUpdateEntry(FCB, vfatVolumeIsFatX(DeviceExt));
+
+ if (NotifyFilter != 0)
+ {
+ FsRtlNotifyFullReportChange(DeviceExt->NotifySync,
+ &(DeviceExt->NotifyList),
+ (PSTRING)&FCB->PathNameU,
+ FCB->PathNameU.Length - FCB->LongNameU.Length,
+ NULL, NULL, NotifyFilter, FILE_ACTION_MODIFIED,
+ NULL);
+ }
return STATUS_SUCCESS;
}