Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix support for long non-residential symlinks #35

Merged
merged 5 commits into from
Oct 17, 2024
Merged

Conversation

twiggler
Copy link
Contributor

The targets of non-residential symlinks were not completely read. This is because the size of the symlink header was not taken into account on XFS version 5.

Added a test with a very long symlink and also check number of blocks.

Bonus:

  • Modernize typings

Closes #34

Copy link

codecov bot commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 65.47%. Comparing base (02c5531) to head (c9ca5bf).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dissect/xfs/xfs.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
+ Coverage   64.50%   65.47%   +0.96%     
==========================================
  Files           4        4              
  Lines         417      420       +3     
==========================================
+ Hits          269      275       +6     
+ Misses        148      145       -3     
Flag Coverage Δ
unittests 65.47% <88.88%> (+0.96%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@twiggler twiggler marked this pull request as ready for review October 15, 2024 07:23
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it's maybe a bit nicer to have this file in tests/data, it's more consistent with other dissect projects to have it in the project root instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently there already was a .gitattributes in the project root, so it is also more consistent with this project :)
Fixed.

@twiggler twiggler merged commit a2199c4 into main Oct 17, 2024
20 checks passed
@twiggler twiggler deleted the fix-long-symlinks branch October 17, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XFS: Error when running cat or stat with long symlinks
3 participants