uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.8k stars 1.28k forks source link

cp: Duplicate source error message should specify the type of file. #6832

Closed matrixhead closed 3 weeks ago

matrixhead commented 3 weeks ago

When a source directory is specified more than once, the error message should clearly indicate that it’s a directory, not a file.

Example:

mkdir b; mkdir d;
cp -r b b d/

GNU’s cp produces the following message:

warning: source directory 'b' specified more than once

Whereas uu-cp outputs:

warning: source file 'b' specified more than once
cakebaker commented 3 weeks ago

Fixed by https://github.com/uutils/coreutils/pull/6825