We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45e4377 commit c9f6830Copy full SHA for c9f6830
DiskAccessLibrary/FileSystems/NTFS/AttributeData/IndexData.cs
@@ -299,7 +299,14 @@ public void RemoveEntry(byte[] key)
299
if (leaf.IndexEntries.Count == 0)
300
{
301
int indexOfLeafPointer = pathToLeaf[pathToLeaf.Count - 1].Key;
302
- RemovePointer(pathToLeaf.GetRange(0, pathToLeaf.Count - 1), indexOfLeafPointer);
+ if (pathToLeaf.Count > 1)
303
+ {
304
+ RemovePointer(pathToLeaf.GetRange(0, pathToLeaf.Count - 1), indexOfLeafPointer);
305
+ }
306
+ else
307
308
+ RemovePointerFromRoot(indexOfLeafPointer);
309
310
DeallocateIndexRecord(leafRecordIndex);
311
}
312
0 commit comments