mft icon indicating copy to clipboard operation
mft copied to clipboard

Attempt to Update Bitflags

Open reece394 opened this issue 11 months ago • 0 comments

This bumps bitflags up to the latest release 2.7. In order to do this I had to add derive lines to maintain compatibility with the older version. I also had to use fmt::Display to change the output back to the way it was before the update as the latest version of bitflags outputs like this FileAttributeFlags(FILE_ATTRIBUTE_READONLY) rather than FILE_ATTRIBUTE_READONLY.

One potential issue I noticed is when I used mft_dump json with mft_dump --output-format json --output test1.json mft.bin and compared the outputs of the older version is that it outputs IndexRootFlags with both SMALL_INDEX and LARGE_INDEX rather than just LARGE_INDEX for the older version. This might be due to the way the bits are handled now but the rest of the outputs seem to match fine and pass the tests.

The default behaviour is to not output any info for 0x00 flags anymore in bitflags hence the if statement in IndexRootFlags FYI

reece394 avatar Jan 11 '25 15:01 reece394