Repository navigation
Conversation
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.
Do not silently omit unreadable extended attributes from backups
Closes #596.
LocalSourceSaveOptions::map_entrycurrently turnsSelf::xattrs(entry.path())errors into an empty attribute list withunwrap_or_default(). A file whose xattrs exist but cannot be read is therefore saved as though it has no xattrs, and backup error reporting does not see that failure.The narrow fix propagates the
ErrorXattrresult from the mapper instead. The existingLocalSourceWalkerconverts that to a source error, and the archiver'sreport_source_error()records it viaProgress::errorand incrementserror_count. An unreadable file entry is therefore reported instead of silently misrepresented. Deliberateset_xattrs=Nostill performs no xattr reads, and readable files with no attributes still succeed.Three deterministic regression tests cover:
ErrorXattrreturned;The tests do not depend on filesystem ACL support or a privileged test runner. Scoped formatter/test qualifications were exercised independently on a GitHub-hosted runner: https://github.com/lmtlssss/rustic_core/actions/runs/40240466719 .
Behavioral tradeoff: a file whose xattrs cannot be read will now be reported as a source error rather than archived with silently incomplete metadata; the archiver continues processing other entries. This is source-level test coverage, not a real macOS deny-readextattr acceptance test. Please review the desired handling of xattr-specific errors before merging.
No repository files, production backups, signing keys, or user data were touched in validation.