Skip to content

mv: error message "Directory not empty" is confusing #5102

@niron1

Description

@niron1

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"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions