Skip to content

Conversation

@Alonely0
Copy link
Contributor

@Alonely0 Alonely0 commented Oct 9, 2025

This pull request fixes an edge case in which cp would crash when provided the -T flag, and also fixes a logic bug that arose in this edge case. Furthermore, a test case has been added to improve the test coverage of this flag. This PR fixes #8708.

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)

@Alonely0
Copy link
Contributor Author

Alonely0 commented Oct 10, 2025

Interesting how CI is having an embolism over supported features on our MSRV (still has an outdated compiler cached?) but also about some random package (outdated ubuntu repos?)? The former is not a big deal because I can just reverse the latest commit, which is the one actually needs 1.85.0; the later, however...

EDIT: I was gaslighted by the internet yesterday, ima revert the commit.

@cakebaker
Copy link
Contributor

@Alonely0 the issue with the outdated ubuntu repo should be fixed with #8865

Fixed a couple of bugs: firstly, one where cp would error out when providing -T on some cases where the assumption of a prefix on the destination path was false; the second one was a logic error in which cp would not respect -T if the destination directory was provided with a terminator slash or (presumably, on Windows/DOS) a backslash.
@Alonely0
Copy link
Contributor Author

@Alonely0 the issue with the outdated ubuntu repo should be fixed with #8865

Tysm. Let's see if it complains about let-chains (been finding conflicting info on stabilization status) and if it does I'll push my local branch with the commit reverted.

@cakebaker
Copy link
Contributor

@Alonely0 let chains have been introduced with Rust 1.88, see https://blog.rust-lang.org/2025/06/26/Rust-1.88.0/#let-chains

@Alonely0
Copy link
Contributor Author

Yeah, done. I've removed the unwrap call anyway; I don't feel comfortable with those.

@cakebaker cakebaker merged commit daa828b into uutils:main Oct 10, 2025
103 checks passed
@cakebaker
Copy link
Contributor

Thanks for your PR!

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.

The result of cp -rfT executed in uutils coreutils is different from the result in GNU Coreutils.

2 participants