mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:42:57 +00:00
[FASTFAT]
In case we're performing an in-place move (ie, in the same directory), if short name matches before and after, keep it. This avoids that a file with long file name sees its short name changing on normally 'non-effect' renames. For instance, in case of case-change only rename, short name will now be preserved. See ya, you 7y old bug :-) CORE-3875 #resolve #comment Fixed with r71270 svn path=/trunk/; revision=71270
This commit is contained in:
parent
38b36a3dc0
commit
3b58992913
2 changed files with 14 additions and 0 deletions
|
@ -345,6 +345,18 @@ FATAddEntry(
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else if (MoveContext)
|
||||||
|
{
|
||||||
|
ASSERT(*Fcb);
|
||||||
|
if (strncmp((char *)SearchContext.DirEntry.Fat.ShortName, (char *)(*Fcb)->entry.Fat.ShortName, 11) == 0)
|
||||||
|
{
|
||||||
|
if (MoveContext->InPlace)
|
||||||
|
{
|
||||||
|
ASSERT(SearchContext.DirEntry.Fat.FileSize == MoveContext->FileSize);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (i == 100) /* FIXME : what to do after this ? */
|
if (i == 100) /* FIXME : what to do after this ? */
|
||||||
{
|
{
|
||||||
|
@ -947,6 +959,7 @@ VfatMoveEntry(
|
||||||
|
|
||||||
OldParent = pFcb->parentFcb;
|
OldParent = pFcb->parentFcb;
|
||||||
CcPurgeCacheSection(&OldParent->SectionObjectPointers, NULL, 0, FALSE);
|
CcPurgeCacheSection(&OldParent->SectionObjectPointers, NULL, 0, FALSE);
|
||||||
|
MoveContext.InPlace = (OldParent == ParentFcb);
|
||||||
|
|
||||||
/* Add our new entry with our cluster */
|
/* Add our new entry with our cluster */
|
||||||
Status = VfatAddEntry(DeviceExt,
|
Status = VfatAddEntry(DeviceExt,
|
||||||
|
|
|
@ -488,6 +488,7 @@ typedef struct _VFAT_MOVE_CONTEXT
|
||||||
ULONG FileSize;
|
ULONG FileSize;
|
||||||
USHORT CreationDate;
|
USHORT CreationDate;
|
||||||
USHORT CreationTime;
|
USHORT CreationTime;
|
||||||
|
BOOLEAN InPlace;
|
||||||
} VFAT_MOVE_CONTEXT, *PVFAT_MOVE_CONTEXT;
|
} VFAT_MOVE_CONTEXT, *PVFAT_MOVE_CONTEXT;
|
||||||
|
|
||||||
FORCEINLINE
|
FORCEINLINE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue