-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: fix invalid numbered backup path #6119
base: main
Are you sure you want to change the base?
Conversation
f38fc1b
to
d4bc4cd
Compare
d4bc4cd
to
8d5334a
Compare
Could you please add an highlevel integration test in https://github.com/uutils/coreutils/blob/main/tests/by-util/test_mv.rs ? thanks |
8d5334a
to
5f2f7dc
Compare
@sylvestre I have added integration test. |
GNU testsuite comparison:
|
@sylvestre @tertsdiepraam Is there anything else I need to do if I want this PR to be merged? |
let test_path = Path::new(test_path_str); | ||
let file_name = path.file_name().unwrap_or_default(); | ||
let mut numbered_file_name = file_name.to_os_string(); | ||
numbered_file_name.push(".~1~"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can it be incremental ? like .2, .3, etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to keep the logic the same as before. I think this just checks if the numbered backup exists. Only checking for '.1' is enough. If it exists, then we're still using the numbered backup, else we're using simple backup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping ?
sorry, English isn't my native language. What does "ping" mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, if you are still working on it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything else I need to do next?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed that there are some compilation errors being reported currently. If you intend to merge this PR, I can go and handle them.
5f2f7dc
to
9e4566b
Compare
9e4566b
to
4b7b26f
Compare
GNU testsuite comparison:
|
see #6040 (comment)
the gnu mv:
the uu_mv: