[FASTFAT]
[reactos.git] / reactos / drivers / filesystems / fastfat / dirwr.c
index 1d5c433..a7785c4 100644 (file)
@@ -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;
     CcPurgeCacheSection(&OldParent->SectionObjectPointers, NULL, 0, FALSE);
 
     OldParent = pFcb->parentFcb;
     CcPurgeCacheSection(&OldParent->SectionObjectPointers, NULL, 0, FALSE);
+    MoveContext.InPlace = (OldParent == ParentFcb);
 
     /* Add our new entry with our cluster */
     Status = VfatAddEntry(DeviceExt,
 
     /* Add our new entry with our cluster */
     Status = VfatAddEntry(DeviceExt,