-
-
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
cp: fix "delete before copy" logic. Add tests. #6712
base: main
Are you sure you want to change the base?
cp: fix "delete before copy" logic. Add tests. #6712
Conversation
Also: fix "delete before copy" verbose mode output.
Could you please be more explicit about the issue you are fixing ? thanks |
GNU testsuite comparison:
|
Sorry. The issue is kind of explained in this deleted comment: Lines 1775 to 1779 in b8150f5
If This incorrect check was causing some necessary pre-copy deletions to be skipped, which then caused the copy operation to fail due to lack of write permission. I added tests for this edge case (the ones where the destination file mode is 077, as opposed to 000 in the other "delete before copy" tests). |
GNU testsuite comparison:
|
GNU testsuite comparison:
|
6eabcd1
to
7ac22e6
Compare
GNU testsuite comparison:
|
5401d2f
to
6874b16
Compare
GNU testsuite comparison:
|
6874b16
to
8828d61
Compare
GNU testsuite comparison:
|
8828d61
to
52cf68b
Compare
println!("skipped {}", path.quote()); | ||
} | ||
// TODO | ||
// Revert to 1_i32 when "mv/update" is fixed |
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.
could you please add a link to the issue ?
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 need to make one. I remember that this is the part of the test causing problems, but I'll have to refresh my memory on this:
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.
please let me know when both comments are addressed :)
if !is_dest_removed { | ||
|
||
let dest_was_removed = if is_dest_removed { | ||
// TODO |
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.
why this todo ?
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.
That was an uncommon edge case, but I'll have to refresh my memory on the details. We don't have tests covering it.
Also: fix "delete before copy" verbose mode output.