WinMerge / winmerge

WinMerge is an Open Source differencing and merging tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle.
https://winmerge.org/
GNU General Public License v2.0
6.39k stars 793 forks source link

Patch Generator erroneously saying that a file has been written #2385

Open vlakoff opened 2 months ago

vlakoff commented 2 months ago

Steps to reproduce:

  1. Open "Tools > Generate Patch..."
  2. Ensure that "Result:" input is blank (which is its initial state)
  3. Click on "OK"

Currently, WinMerge shows a "Patch file successfully written" message, although it didn't create any file actually.

Note there is a "Copy to Clipboard" checkbox, that can be used whether writing a file or not.

UI that I may suggest:

☐ Copy to Clipboard
☑ Write to file
    ☐ Append to existing file
sdottaka commented 2 months ago

Well, actually, WinMerge isn't lying and actually writes to a temporary file %TEMP%\WinMerge_TEMP_xxxx\patxxxx.tmp. This is useful if the "Open to external editor" option is checked, but may not make sense if that option is not used...

vlakoff commented 2 months ago

I had searched for created files, but missed this temp file…

Thus, I could suggest the following:

☐ Copy to Clipboard
☑ Write to file
    ☐ Append to existing file
    ☐ Open IN external editor

With these amendments:

vlakoff commented 2 months ago

Thinking about adding a "Write to temporary file" checkbox:

☐ Copy to Clipboard
☑ Write to file
    ☐ Append to existing file
    ☐ Open IN external editor
    Result: ________ [Browse...]
    ☐ Write to temporary file
vlakoff commented 2 months ago

And thinking about an alternative approach (the following represents 3 radio buttons, the first one is toggled on):

⚫ Write to file
    Result: ________ [Browse...]
    ☐ Append to existing file
    ☐ Open IN external editor
⚪ Open in temporary file
⚪ Copy to Clipboard