Skip to content

mv allows moving a directory into itself #2612

@demilich1

Description

@demilich1

Describe the bug
The mv command allows to move a directory into a subdirectory of itself. At least there is no error message but the end result is that the directory is gone (deleted)

To Reproduce
Steps to reproduce the behavior:

mkdir a
mkdir a/b
mv a a/b

Expected behavior
I would expect an error message of some kind, i.e. the standard linux mv command outputs
mv: cannot move 'a' to a subdirectory of itself, 'a/b/a'

Configuration (please complete the following information):

  • OS: Tested on Windows
  • Nu version: nushell 0.20.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions