cp: treat an empty file name as a non-existing file#6683
cp: treat an empty file name as a non-existing file#6683BenWiederhake merged 2 commits intouutils:mainfrom
Conversation
fa3a37b to
74c0963
Compare
7d27f1f to
55e0521
Compare
BenWiederhake
left a comment
There was a problem hiding this comment.
Straight-forward implementation, tests, lovely.
Can you make the tests a bit more specific, just in case cp encounters an unrelated issue?
There was a problem hiding this comment.
LGTM!
The unhelpful error message on windows is a pity, but out of scope for this PR.
Let's see if known issue #6534 remains the only CI failure.
EDIT: Oops, I celebrated too early.
thread 'test_cp::test_cp_multiple_files_with_empty_file_name' panicked at tests\by-util\test_cp.rs:182:10:
'cp: The system cannot find the path specified. (os error 3)
' does not contain 'The system cannot find the file specified'
33227c6 to
d8348ea
Compare
The message on Windows is different for the empty file name and other non-existent file names. I've entered a new version. |
|
GNU testsuite comparison: |
|
@BenWiederhake The only failing test is the Windows test coverage which has since be disabled in the CI. |
d8348ea to
d2846bc
Compare
|
Thanks! |
The
PathBufvalue parser fromclapcannot be used directly as it does not (rightly) accept empty file names.Fix #6177