Skip to content
This repository has been archived by the owner on Nov 28, 2021. It is now read-only.

"Sequence contains no matching element" exception #4

Open
VladimirK69 opened this issue Jun 15, 2021 · 1 comment
Open

"Sequence contains no matching element" exception #4

VladimirK69 opened this issue Jun 15, 2021 · 1 comment

Comments

@VladimirK69
Copy link

System.InvalidOperationException
HResult=0x80131509
Message=Sequence contains no matching element
Source=System.Core
StackTrace:
at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate)
at NTFSLib.IO.NtfsDirectory.PrepRecord() in ... NtfsLib\NtfsLib\NTFSLib\IO\NtfsDirectory.cs:line 48

Happening with files in "c:\Program Files\Microsoft SQL Server\MSSQL12.MSSQL2014\MSSQL\DATA" and "c:\Program Files\Microsoft SQL Server\MSSQL14.MSSQL2017\MSSQL\DATA" (SQL Server databases). This system drive was made by copying by Samsung/DataMigration, but server, file managers and C# library made by porting NTFSLib made by Yibo Cai are working.

In MFTRecord.Attributes

            // Get root
            _indexRoot = MFTRecord.Attributes.OfType<AttributeIndexRoot>().Single(s => s.AttributeName == DirlistAttribName);

I see
[0] = {NTFSLib.Objects.Attributes.AttributeStandardInformation}
[1] = {NTFSLib.Objects.Attributes.AttributeList}
[2] = {NTFSLib.Objects.Attributes.AttributeFileName}
[3] = {NTFSLib.Objects.Attributes.AttributeFileName}
[4] = {NTFSLib.Objects.Attributes.AttributeObjectId}
[5] = {NTFSLib.Objects.Attributes.AttributeLoggedUtilityStream}

@LordMike
Copy link
Owner

LordMike commented Jun 15, 2021

Could seem that the AttributeList is not being expanded.

Unfortunately I'm not maintaining this library any more, as the codebase has been stale for some time and I've moved to other projects. You're more than welcome to try to insert code that expands the attribute list, alternatively you could look at projects like DiscUtils which has an NTFS library as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants