Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As we experienced in #212 there were several issues discovered with the mft library being used. It turns out a lot of the issues we have been experiencing have already been fixed by others. As a result I forked the library over to here with cherry picked commits from omerbenamram/mft#120, omerbenamram/mft#119 and hodf-cye/mft@e5c8b66 as well as bumping up some of the rust dependencies. I haven't bumped them all yet due to some having significant changes that need testing. The intention for this is for either the cloning of the repo I have started or me transferring it over and then we can change it to the WithSecureLabs repos instead of being external.
One issue that will need fixed is when dumping to JSON it outputs as one / instead of // and I believe JSON wants them escaped. CSV is fine however.
Managed to bump up the dependencies to latest which should help with maintainability going forward. I also fixed the benchmark file too that didn't account for changes in the code.
When running tests on the library you should run:
cargo test -- --skip "readme_sect_library_usage_line_33" as skeptic isn't checking the readme properly (not a deal breaker)
Bitflags was the most troublesome due to them changing the way they serialised the output. I modified this code to use fmt:Display to restore the prior output however one output difference if you use the mft_dump binary the library outputs using the json output format the IndexRootFlags appear to output both SMALL_INDEX and LARGE_INDEX instead of previously just outputting LARGE_INDEX. I am not sure if this is a bug yet but it would be good to figure that one out.