Skip to content

fix: Error thrown during dry-run#952

Open
userwiths wants to merge 2 commits into
RsyncProject:masterfrom
userwiths:fix/single-file-dry-run
Open

fix: Error thrown during dry-run#952
userwiths wants to merge 2 commits into
RsyncProject:masterfrom
userwiths:fix/single-file-dry-run

Conversation

@userwiths
Copy link
Copy Markdown

closes: #880

get_local_name refers to 2 "modes", when the destination is a folder and when its a file.

It seems that change_dir should take into account if we are dry-running in both cases, but it was considering the option only when dest was a folder

`get_local_name` refers to 2 "modes", when the destination is a folder and when its a file.

It seems that `change_dir` should take into account if we are dry-running in both cases, but it was considering the option only when dest was a folder
Copy link
Copy Markdown

@steadytao steadytao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this. Confirmed fix.

This looks like the right behavioural fix to me. The only thing I would suggest is adding a small regression test for the single-file --dry-run --mkpath case so it stays covered.

@userwiths
Copy link
Copy Markdown
Author

Not sure how things are handled here, so i used for example what i found in the testsuite. Tested with the same file on master and on this branch, and as expected it fails on master and passes here.

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.

--dry-run doesn't work with --mkpath when copying files

2 participants