ole32: Clear the sibling links when reinserting a renamed element.
authorVincent Povirk <vincent@codeweavers.com>
Fri, 26 Feb 2010 16:02:17 +0000 (10:02 -0600)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 2 Mar 2010 15:44:12 +0000 (16:44 +0100)
dlls/ole32/storage32.c

index 88e05244fdb8b1e8d702d2b089841ef2017ad5b5..837365bdb9d60847945b19e0b3f4e1074975031d 100644 (file)
@@ -797,6 +797,10 @@ static HRESULT WINAPI StorageBaseImpl_RenameElement(
     /* Change the name of the element */
     strcpyW(currentEntry.name, pwcsNewName);
 
+    /* Delete any sibling links */
+    currentEntry.leftChild = DIRENTRY_NULL;
+    currentEntry.rightChild = DIRENTRY_NULL;
+
     StorageBaseImpl_WriteDirEntry(This, currentEntryRef,
         &currentEntry);