Author: tfaber
Date: Sun Aug 7 14:24:45 2016
New Revision: 72147
URL:
http://svn.reactos.org/svn/reactos?rev=72147&view=rev
Log:
[FASTFAT]
- Update FCB hashes after changing the path name
CORE-11377
Modified:
trunk/reactos/drivers/filesystems/fastfat/fcb.c
Modified: trunk/reactos/drivers/filesystems/fastfat/fcb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/fcb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/fcb.c [iso-8859-1] Sun Aug 7 14:24:45 2016
@@ -347,6 +347,7 @@
ULONG Index;
ULONG ShortIndex;
+ ASSERT(pFCB->Hash.Hash == vfatNameHash(0, &pFCB->PathNameU));
Index = pFCB->Hash.Hash % pVCB->HashTableSize;
ShortIndex = pFCB->ShortHash.Hash % pVCB->HashTableSize;
@@ -376,6 +377,7 @@
RtlCopyMemory(&Fcb->entry, &DirContext->DirEntry, sizeof (DIR_ENTRY));
RtlCopyUnicodeString(&Fcb->ShortNameU, &DirContext->ShortNameU);
+ Fcb->Hash.Hash = vfatNameHash(0, &Fcb->PathNameU);
if (Vcb->Flags & VCB_IS_FATX)
{
Fcb->ShortHash.Hash = Fcb->Hash.Hash;
@@ -457,7 +459,7 @@
Fcb->PathNameBuffer = Fcb->PathNameU.Buffer;
Fcb->DirNameU.Buffer = Fcb->PathNameU.Buffer;
vfatSplitPathName(&Fcb->PathNameU, &Fcb->DirNameU,
&Fcb->LongNameU);
-
+ Fcb->Hash.Hash = vfatNameHash(0, &Fcb->PathNameU);
if (pVCB->Flags & VCB_IS_FATX)
{
Fcb->ShortHash.Hash = Fcb->Hash.Hash;