Visitar URL original
fix: name the caller path when append refuses a binary file by SebTardif · Pull Request #2723 · patchloom/patchloom · GitHub
Skip to content

fix: name the caller path when append refuses a binary file - #2723

Merged
SebTardif merged 1 commit into
mainfrom
fix/2720-append-binary-caller-path
Nov 5, 2026
Merged

SebTardif merged 1 commit into
mainfrom
fix/2720-append-binary-caller-path

Conversation

@SebTardif

Copy link
Copy Markdown
Contributor

file_append and file_prepend report the path the caller passed when they refuse a binary file.

Without a guard, the library stores an absolute path on the plan operation so a nested relative dest still resolves. The refusal text used that absolute path. A call with bin.link printed an absolute path and left the target unchanged.

The error text now uses the caller spelling for append and prepend refusals (binary, invalid UTF-8, missing file, and not a file). The plan path stays absolute, so resolution and backups are unchanged.

cargo test --lib --all-features file_append passed (22 tests). cargo clippy --lib --tests --all-features -- -D warnings passed. The library build without the files feature still compiles, and file_append_and_prepend_basic passed there.

Closes #2720

file_append and file_prepend store an absolute path on the plan op
when no guard is set, so a nested relative dest does not double-join.
Refusals echoed that absolute path. The error now uses the path the
caller passed, and the file is not written.

Closes #2720

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@SebTardif
SebTardif marked this pull request as ready for review November 5, 2026 12:43
@SebTardif
SebTardif merged commit 71e9bb0 into main Nov 5, 2026
78 checks passed
@SebTardif
SebTardif deleted the fix/2720-append-binary-caller-path branch November 5, 2026 12:52
SebTardif pushed a commit that referenced this pull request Nov 5, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.37.7](patchloom-v0.37.6...patchloom-v0.37.7)
(2026-11-05)


### Bug Fixes

* name the caller path when append refuses a binary file
([#2723](#2723))
([71e9bb0](71e9bb0)),
closes [#2720](#2720)
* name the caller path when file ops refuse
([#2725](#2725))
([4f82395](4f82395))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: patchloom-release[bot] <291219740+patchloom-release[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[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.

file.append binary error prints an absolute path

1 participant