Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix: include path in canonicalization errors - #548

Merged
aawsome merged 1 commit into
rustic-rs:mainfrom
magrathean-uk:fix/issue-429-canonicalize-context
Aug 26, 2026
Merged

aawsome merged 1 commit into
rustic-rs:mainfrom
magrathean-uk:fix/issue-429-canonicalize-context

Conversation

@magrathean-uk

Copy link
Copy Markdown
Contributor

Summary

  • retain the failing path when canonicalization fails
  • include it in the user-facing error and regression test

Fixes #429

Validation

  • cargo test -p rustic_core path_list_sanitize_error_includes_path --locked
  • cargo check -p rustic_core --locked
  • cargo fmt --check

@magrathean-uk
magrathean-uk marked this pull request as ready for review August 25, 2026 09:34

@aawsome aawsome left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thanks @magrathean-uk

@aawsome
aawsome enabled auto-merge August 26, 2026 07:33
@aawsome
aawsome added this pull request to the merge queue Aug 26, 2026
Merged via the queue into rustic-rs:main with commit c4059e3 Aug 26, 2026
21 of 22 checks passed
@rustic-release-plz rustic-release-plz Bot mentioned this pull request Aug 26, 2026
aawsome added a commit to stefanwichmann/rustic_core that referenced this pull request Oct 31, 2026
…c-rs#630)

`repofile::snapshotfile::tests::path_list_sanitize_error_includes_path`
fails on `Test (stable, windows-latest)`, which turns CI red on open
PRs.

The test was added in rustic-rs#548, which already had this job red. The error
message prints the path with `{0:?}`, so a Windows path has its
backslashes doubled, while the test looked for `display()` output. The
two only match on paths without a backslash.

The test now compares the same Debug form. The error message does not
change.

CI passes with this change on the fork, Windows included:
https://github.com/Akayashuu/rustic_core/actions/runs/41106203479

Co-authored-by: aawsome <37850842+aawsome@users.noreply.github.com>
mchobbit pushed a commit to mchobbit/rustic_core that referenced this pull request Nov 5, 2026
## Summary

- retain the failing path when canonicalization fails
- include it in the user-facing error and regression test

Fixes rustic-rs#429

## Validation

- cargo test -p rustic_core path_list_sanitize_error_includes_path
--locked
- cargo check -p rustic_core --locked
- cargo fmt --check

Co-authored-by: Magrathean UK <magrathean-uk@users.noreply.github.com>
(cherry picked from commit c4059e3)
mchobbit pushed a commit to mchobbit/rustic_core that referenced this pull request Nov 5, 2026
…c-rs#630)

`repofile::snapshotfile::tests::path_list_sanitize_error_includes_path`
fails on `Test (stable, windows-latest)`, which turns CI red on open
PRs.

The test was added in rustic-rs#548, which already had this job red. The error
message prints the path with `{0:?}`, so a Windows path has its
backslashes doubled, while the test looked for `display()` output. The
two only match on paths without a backslash.

The test now compares the same Debug form. The error message does not
change.

CI passes with this change on the fork, Windows included:
https://github.com/Akayashuu/rustic_core/actions/runs/41106203479

Co-authored-by: aawsome <37850842+aawsome@users.noreply.github.com>
(cherry picked from commit d56cc4a)
mchobbit pushed a commit to mchobbit/rustic_core that referenced this pull request Nov 22, 2026
## 🤖 New release

* `rustic_core`: 0.13.0 -> 0.14.0 (✓ API compatible changes)
* `rustic_backend`: 0.7.0 -> 0.8.0 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

## `rustic_core`

<blockquote>

##
[0.14.0](rustic-rs/rustic_core@rustic_core-v0.13.0...rustic_core-v0.14.0)
- 2026-11-17

### Added

- count unreadable source files during backup
([rustic-rs#561](rustic-rs#561))
- impl Serialize/Deserialize and Merge for ConfigOptions
([rustic-rs#559](rustic-rs#559))

### Fixed

- *(chunker)* [**breaking**] prefill the whole rolling hash window
([rustic-rs#638](rustic-rs#638))
- *(chunker)* keep chunks within bounds for a small min size
([rustic-rs#637](rustic-rs#637))
- *(prune)* [**breaking**] Fix bug with concurrent prune runs and
recovered packs
([rustic-rs#639](rustic-rs#639))
- set is_hot from the repository in init_with_config
([rustic-rs#602](rustic-rs#602))
- *(restore)* replace an entry that sits where a hardlink belongs
([rustic-rs#634](rustic-rs#634))
- *(backup)* compare inodes unless ignore_inode is set
([rustic-rs#632](rustic-rs#632))
- *(forget)* count minutes within the same hour for keep-minutely
([rustic-rs#633](rustic-rs#633))
- *(prune)* safely handle directory nodes without subtree in
find_used_blobs
([rustic-rs#587](rustic-rs#587))
- *(restore)* prevent path traversal in LocalDestination
([rustic-rs#590](rustic-rs#590))
- join tree loader threads before releasing the index
([rustic-rs#607](rustic-rs#607))
- reject key files with invalid or excessive scrypt parameters
([rustic-rs#592](rustic-rs#592))
- *(packer)* validate blob offsets and bounds in BlobCopier
([rustic-rs#591](rustic-rs#591))
- don't overflow in BlobLocations::can_coalesce
([rustic-rs#589](rustic-rs#589))
- *(tree)* safely handle directory nodes without subtree in NodeStreamer
and merge_nodes
([rustic-rs#588](rustic-rs#588))
- *(repair)* safely handle file nodes with missing content in repair
snapshots ([rustic-rs#586](rustic-rs#586))
- don't underflow in BlobLocation::data_length
([rustic-rs#585](rustic-rs#585))
- [**breaking**] Fix clippy lints and security issues
([rustic-rs#629](rustic-rs#629))
- [**breaking**] Don't merge subpaths
([rustic-rs#563](rustic-rs#563))
- stop tree workers after receiver closes
([rustic-rs#546](rustic-rs#546))
- include path in canonicalization errors
([rustic-rs#548](rustic-rs#548))
- iOS build ([rustic-rs#553](rustic-rs#553))
- protect cache backend with locks
([rustic-rs#544](rustic-rs#544))

### Other

- update dependencies
([rustic-rs#653](rustic-rs#653))
- fix cargo-careful on main
([rustic-rs#648](rustic-rs#648))
- don't hash all-zero chunks
([rustic-rs#611](rustic-rs#611))
- compare the Debug form of the path in the sanitize error
([rustic-rs#630](rustic-rs#630))
- tidy up type parameters
([rustic-rs#580](rustic-rs#580))
- update core README credential API
([rustic-rs#549](rustic-rs#549))
</blockquote>

## `rustic_backend`

<blockquote>

##
[0.8.0](rustic-rs/rustic_core@rustic_backend-v0.7.0...rustic_backend-v0.8.0)
- 2026-11-17

### Added

- add a connect-timeout option for http-based backends
([rustic-rs#642](rustic-rs#642))
- add a read-timeout option for http-based backends
([rustic-rs#598](rustic-rs#598))
- log OpenDAL retries as a single line
([rustic-rs#562](rustic-rs#562))
- [**breaking**] Add more reqwest options for rest+opendal backends
([rustic-rs#556](rustic-rs#556))

### Fixed

- *(prune)* [**breaking**] Fix bug with concurrent prune runs and
recovered packs
([rustic-rs#639](rustic-rs#639))
- *(backend)* propagate opendal errors when checking for config
([rustic-rs#640](rustic-rs#640))
- [**breaking**] Fix clippy lints and security issues
([rustic-rs#629](rustic-rs#629))
- run delete hook when replacing a file
([rustic-rs#547](rustic-rs#547))

### Other

- update dependencies
([rustic-rs#653](rustic-rs#653))
- [**breaking**] Prefix all http transport options with http-
([rustic-rs#558](rustic-rs#558))
- add OpenDAL attribution
([rustic-rs#552](rustic-rs#552))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: rustic-release-plz[bot] <182542030+rustic-release-plz[bot]@users.noreply.github.com>
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.

canonicalizing path failed does not show which path failed

2 participants