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

DRAFT: Add capability parsing #167

Closed
wants to merge 1 commit into from

Conversation

dsteeley
Copy link
Contributor

📜 Checklist

  • Commits are cleanly separated and have useful messages
  • A changelog entry or entries has been added to CHANGELOG.md
  • Documentation is thorough
  • Test coverage is excellent and passes
  • Works when tests are run --all-features enabled

match (modes, users, groups, digests, mtimes, sizes, flags) {
(Ok(modes), Ok(users), Ok(groups), Ok(digests), Ok(mtimes), Ok(sizes), Ok(flags)) => {
match (modes, users, groups, digests, mtimes, sizes, flags, caps) {
(Ok(modes), Ok(users), Ok(groups), Ok(digests), Ok(mtimes), Ok(sizes), Ok(flags), Ok(caps)) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will need to take into account the (very likely) possibility that there won't be caps to iterate over, even when the other tags exist. Probably we need to handle this particular tag independently of the rest.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've moved this to the other capabilities PR.
To solve this issue I've gone with representing caps as a Result<Option<&[String]>>.

If the header isn't found then the assumption is made that no files have capabilities set and the caps field is None

@dralley dralley closed this Aug 15, 2023
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.

2 participants