mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
[FASTFAT]
- Always use the full path name when looking for FCB hashes CORE-10483 #resolve svn path=/trunk/; revision=70304
This commit is contained in:
parent
99319d5ab2
commit
8b9fb19bab
|
@ -437,6 +437,7 @@ vfatGrabFCBFromTable(
|
|||
|
||||
DPRINT("'%wZ'\n", PathNameU);
|
||||
|
||||
ASSERT(PathNameU->Length >= sizeof(WCHAR) && PathNameU->Buffer[0] == L'\\');
|
||||
Hash = vfatNameHash(0, PathNameU);
|
||||
|
||||
entry = pVCB->FcbHashTable[Hash % pVCB->HashTableSize];
|
||||
|
@ -812,14 +813,15 @@ vfatGetFCBForFile(
|
|||
DPRINT("vfatGetFCBForFile (%p,%p,%p,%wZ)\n",
|
||||
pVCB, pParentFCB, pFCB, pFileNameU);
|
||||
|
||||
FileNameU.Buffer = NameBuffer;
|
||||
FileNameU.MaximumLength = sizeof(NameBuffer);
|
||||
RtlCopyUnicodeString(&FileNameU, pFileNameU);
|
||||
RtlInitEmptyUnicodeString(&FileNameU, NameBuffer, sizeof(NameBuffer));
|
||||
|
||||
parentFCB = *pParentFCB;
|
||||
|
||||
if (parentFCB == NULL)
|
||||
{
|
||||
/* Passed-in name is the full name */
|
||||
RtlCopyUnicodeString(&FileNameU, pFileNameU);
|
||||
|
||||
// Trivial case, open of the root directory on volume
|
||||
if (RtlEqualUnicodeString(&FileNameU, &RootNameU, FALSE))
|
||||
{
|
||||
|
@ -888,9 +890,20 @@ vfatGetFCBForFile(
|
|||
}
|
||||
else
|
||||
{
|
||||
/* Make absolute path */
|
||||
RtlCopyUnicodeString(&FileNameU, &parentFCB->PathNameU);
|
||||
curr = FileNameU.Buffer + FileNameU.Length / sizeof(WCHAR) - 1;
|
||||
if (*curr != L'\\')
|
||||
{
|
||||
RtlAppendUnicodeToString(&FileNameU, L"\\");
|
||||
curr++;
|
||||
}
|
||||
ASSERT(*curr == L'\\');
|
||||
RtlAppendUnicodeStringToString(&FileNameU, pFileNameU);
|
||||
|
||||
FCB = parentFCB;
|
||||
parentFCB = NULL;
|
||||
prev = curr = FileNameU.Buffer - 1;
|
||||
prev = curr;
|
||||
last = FileNameU.Buffer + FileNameU.Length / sizeof(WCHAR) - 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue