Skip to content

restic: restore timestamps after extended attributes#5006

Merged
MichaelEischer merged 3 commits intorestic:masterfrom
MichaelEischer:restore-time-last
Aug 26, 2024
Merged

restic: restore timestamps after extended attributes#5006
MichaelEischer merged 3 commits intorestic:masterfrom
MichaelEischer:restore-time-last

Conversation

@MichaelEischer
Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer commented Aug 15, 2024

What does this PR change? What problem does it solve?

Restoring the xattr containing resource forks on macOS apparently modifies the file modification timestamps. Thus, restore the timestamp after xattrs.

Was the change previously discussed in an issue or on the forum?

Might fix #4969

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • I have added tests for all code changes.
  • [ ] I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I have run gofmt on the code in all commits.
  • All commit messages are formatted in the same style as the other commits in the repo.
  • I'm done! This pull request is ready for review.

restoring the xattr containing resource forks on macOS apparently
modifies the file modification timestamps. Thus, restore the timestamp
after xattrs.
@MichaelEischer
Copy link
Copy Markdown
Member Author

The failed test run https://github.com/restic/restic/actions/runs/10550161274/job/29226013687?pr=5006 confirms that setting the resource fork also results in a timestamp change:

    --- FAIL: TestNodeRestoreAt/#10 (0.00s)
        node_test.go:313: ModTime: file doesn't match (2005-05-14 21:07:03.111 +0000 UTC != 2024-08-25 21:17:05.435601516 +0000 UTC)

Copy link
Copy Markdown
Member Author

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

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

LGTM.

@MichaelEischer MichaelEischer merged commit 2063bf5 into restic:master Aug 26, 2024
@MichaelEischer MichaelEischer deleted the restore-time-last branch August 26, 2024 14:21
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.

Timestamps randomly not restored

1 participant