Skip to content

Improve irregular file handling#4620

Merged
MichaelEischer merged 4 commits intorestic:masterfrom
MichaelEischer:improve-irregular-file-handling
Jan 7, 2024
Merged

Improve irregular file handling#4620
MichaelEischer merged 4 commits intorestic:masterfrom
MichaelEischer:improve-irregular-file-handling

Conversation

@MichaelEischer
Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer commented Jan 6, 2024

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

Since Go 1.21, on Windows most reparse points are considered as irregular files. Depending on the underlying driver these can exhibit nearly arbitrary behavior. When encountering such a file, restic returned an
indecipherable error message: error: invalid node type "".

Add the filepath to the error message and state that the file type is not supported.

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

See #4560 (comment)
Fixes #4560

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.

os.ModeCharDevice is already included in os.ModeType
Since Go 1.21, most reparse points are considered as irregular files.
Depending on the underlying driver these can exhibit nearly arbitrary
behavior. When encountering such a file, restic returned an
indecipherable error message: `error: invalid node type ""`.

Add the filepath to the error message and state that the file type is
not supported.
@MichaelEischer MichaelEischer force-pushed the improve-irregular-file-handling branch from 42919bf to 3e29f8d Compare January 7, 2024 09:52
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 f8b4e93 into restic:master Jan 7, 2024
@MichaelEischer MichaelEischer deleted the improve-irregular-file-handling branch January 7, 2024 10:12
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.

Windows backup - error: invalid node type ""

1 participant