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

Empty files are not copied #2146

Closed
cassiusdrow opened this issue Dec 19, 2023 · 3 comments
Closed

Empty files are not copied #2146

cassiusdrow opened this issue Dec 19, 2023 · 3 comments

Comments

@cassiusdrow
Copy link

In folder mode, empty (zero length) files are not copied when they do not exist on the target side.

@sdottaka
Copy link
Member

I couldn't reproduce this issue.
Which version of WinMerge are you using?
Could you please attach a screenshot of the state just before copying the empty files?

@cassiusdrow
Copy link
Author

It happens in both 2.16.34.0 and 2.16.36.0. It only happens using binary contents compare mode. All other modes work correctly.

Steps to reproduce:

  1. Create two directories: "left" and "right"
  2. In "left" directory, create a zero length file "empty1.txt", a file "test1.txt" containing "testing123", and a file "test2.txt" containing "testing123".
  3. In "right" directory, create a zero length file "empty2.txt", a file "test1.txt" containing "testing456", and a file "test2.txt" containing "testing456".
  4. Compare "left" directory to "right" directory using binary contents compare mode.
  5. It correctly recognizes that the "test1.txt" and "test2.txt" files are different.
  6. Select all files and use the "copy to right" or "copy to left" button on the toolbar.
  7. The "Confirm Copy" dialog window says "Are you sure you want to copy 2 items?"
  8. Clicking "yes" only copies the "test1.txt" and "test2.txt" files.

This zip file contains the above directories and files for testing:
binary-copy-skips-empty-files.zip

@sdottaka
Copy link
Member

Thank you for finding the conditions to reproduce. I am now able to reproduce the problem as well. This issue was fixed in commit 02436c0.

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

No branches or pull requests

2 participants