Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mv: fails if source dir name is subset of target dir name #5481

Closed
cakebaker opened this issue Oct 31, 2023 · 2 comments · Fixed by #5483
Closed

mv: fails if source dir name is subset of target dir name #5481

cakebaker opened this issue Oct 31, 2023 · 2 comments · Fixed by #5483
Labels

Comments

@cakebaker
Copy link
Contributor

cakebaker commented Oct 31, 2023

This issue was mentioned by @allaboutevemirolive in #4833 (comment):

$ mkdir test test2
$ cargo run mv test test2
mv: cannot move 'test' to a subdirectory of itself, 'test2/test'

Using different directory names, the same steps work fine:

$ mkdir aa bb
$ cargo run mv aa bb
$ ls bb
aa
@allaboutevemirolive
Copy link
Contributor

Probably related:

Started: Issue #5102

Pull request: Pull request #5104

If the pull request doesn't fix this ticket, then I guess it's a separate problem.

@cakebaker
Copy link
Contributor Author

No, I don't think it is related to #5102. The issue is caused by https://github.com/uutils/coreutils/blob/main/src/uu/mv/src/mv.rs#L369 and that code is relatively new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants