mv: error message "Directory not empty" is confusing
#5102 aperta il 20 lug 2023
Metriche repository
- Star
- (23.893 stelle)
- Metriche merge PR
- (Merge medio 5g 23h) (239 PR mergiate in 30 g)
Descrizione
in file coreutils/src/uu/mv/src/mv.rs:488 when you try to move a directory to a location already containing a directory with the same name it would just write "Directory not empty" first, this is technically a wrong error message because there is no requirement that the destination would be empty. the destination might as well be populated with some content, we just require that it would not contain a directory with the same name. also, the error message is confusing because it doesn't state that the problem is with the destination. One can think that the problem is actually with the source, and that the source directory having some kind of attribute that would require it to be empty prior to moving. I would suggest to change the error message to: "a directory with the same name already exists at destination"