1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 03:57:44 +00:00

cat: Fix reporting "input file is output file" error when outputting to an input file (#8025)

* cat: Check if a file can be overwritten safely in Unix

* cat: Check if a file can be overwritten safely in Windows

* cat: Test writing read-write file that is input and output

* cat: Unit test `is_appending` function

* cat: Unit test `is_unsafe_overwrite` function

* cat: Comment why a few function calls could return Err

* cat: Remove obvious comments from test
This commit is contained in:
Teemu Pätsi 2025-06-06 13:01:31 +03:00 committed by GitHub
parent 9e21259e2d
commit 4d40671d79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 253 additions and 43 deletions

3
Cargo.lock generated
View file

@ -2613,8 +2613,11 @@ dependencies = [
"clap",
"memchr",
"nix",
"tempfile",
"thiserror 2.0.12",
"uucore",
"winapi-util",
"windows-sys 0.59.0",
]
[[package]]