Skip to content

Conversation

@asder8215
Copy link
Contributor

This PR implements the solution mentioned by @tertsdiepraam and @PThorpe92 in #5102 to provide a clearer move error message on overwriting a non-empty directory in the destination directory with the same name as source directory.

I added and modified a couple of error messages within the locales directory of the mv command. I did use Google Translate to translate the error message in English to French, so I'm not sure if it is well translated.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/mv/dir2dir. tests/mv/dir2dir is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/mv/part-fail. tests/mv/part-fail is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/mv/perm-1. tests/mv/perm-1 is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/mv/dir2dir. tests/mv/dir2dir is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/mv/part-fail. tests/mv/part-fail is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/mv/perm-1. tests/mv/perm-1 is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@asder8215
Copy link
Contributor Author

asder8215 commented Oct 25, 2025

I noticed that my mv command produces this error msg in the scenario mentioned in #5102. For context, my system is on GNU coreutils 9.8-2:

mv: cannot overwrite 'e/dir': Directory not empty

this error msg was proposed by Paul here: https://lists.gnu.org/archive/html/bug-coreutils/2023-07/msg00032.html and it seems to be implemented in GNU coreutils 9.8-2

This is different from the previous error msg that rust coreutils produces:

mv: cannot move 'dir' to 'e/dir': Directory not empty

Currently, I have it set with the error message proposed by PThorpe92:

mv: cannot overwrite: A non-empty directory: '{}' exists at destination

Should I change it to the one that GNU coreutils use as of 9.8-2?

@asder8215
Copy link
Contributor Author

Moreover, I'm unsure why the Android/Test build is failing.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/mv/dir2dir. tests/mv/dir2dir is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/mv/part-fail. tests/mv/part-fail is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/mv/perm-1. tests/mv/perm-1 is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/mv/dir2dir. tests/mv/dir2dir is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/mv/part-fail. tests/mv/part-fail is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/mv/perm-1. tests/mv/perm-1 is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/mv/dir2dir. tests/mv/dir2dir is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/mv/part-fail. tests/mv/part-fail is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/mv/perm-1. tests/mv/perm-1 is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants