Repository navigation
Read an HFS+ catalog and attributes file that continue in the extents overflow tree - #176
Merged
Merged
Conversation
… overflow tree Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017DPjyZZHvaivtvJ3N4hZhz
…nted-catalog # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes for examiners
An HFS+ volume could list as empty while other tools showed its folders. The volume header holds only the first eight extents of each system file. A catalog (or attributes file) in more pieces than that continues in the extents overflow file, which Strata did not consult for those two files. A catalog B-tree's first leaf can be any node in the file, so when it lay beyond the first eight pieces its node read as nothing and the walk ended at once: "Empty directory.", no volume name, no extended attributes, and no message saying why.
Both files are now read in full: their forks are completed from the overflow tree when the header's extents do not account for all their blocks. Ordinary files already did this.
Verification
tests/imagebuild_hfsplus.pycan now scatter the catalog and attributes files a block at a time (so most extents are in the overflow tree) and number the catalog's leaves from the top down. libfshfs, an independent reader, lists that volume correctly (root folder and its 250 entries), so the builder matches the real layout.[], volume nameNone.tests/test_hfsplus_fragmented.py(7 tests) fails on the old code (3 failures, 2 errors) and passes now: listing, file read, extended attributes in a scattered attributes file, volume name, a contiguous volume unchanged, and missing overflow records giving a partial listing rather than an error.🤖 Generated with Claude Code
https://claude.ai/code/session_017DPjyZZHvaivtvJ3N4hZhz
Generated by Claude Code