Skip to content

fs: fix restoring timestamps on older Windows versions for long paths#5061

Merged
MichaelEischer merged 1 commit intorestic:masterfrom
MichaelEischer:fix-timestamp-restore-windows
Oct 16, 2024
Merged

fs: fix restoring timestamps on older Windows versions for long paths#5061
MichaelEischer merged 1 commit intorestic:masterfrom
MichaelEischer:fix-timestamp-restore-windows

Conversation

@MichaelEischer
Copy link
Copy Markdown
Member

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

Go automagically enables long-path support on Windows 10 >=1607 (see golang/go#41734). The standard library calls are also wrapped accordingly to support older Windows versions. However, for some filesystem operations we have to use the syscalls package directly which does not wrap paths.

Most places should already contain a corresponding fixpath(...) call, this PR fixes restoring the timestamp and file attributes.

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

Fixes #1843

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.

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 e91a456 into restic:master Oct 16, 2024
@MichaelEischer MichaelEischer deleted the fix-timestamp-restore-windows branch October 16, 2024 18:47
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.

Timestamp is not restored correctly on file paths longer than 256 chars in Windows

1 participant