winmerge icon indicating copy to clipboard operation
winmerge copied to clipboard

Backup files: Misleading error message when file cannot be written

Open Chealer opened this issue 3 years ago • 5 comments

At least by default, when comparing files and modifying one, WinMerge will attempt to create a backup file before saving modifications. This operation may fail depending on the user's permissions. Unfortunately, when that happens, the error message misleads the users into thinking the modified file cannot be written, when in reality, it is permissions for the backup which are lacking.

Backups are controlled in the Backup files section of Options: image I configured my WinMerge to avoid polluting all directories with backups, but my user didn't have the permission to create files in the global backup folder which I set, and WinMerge did not support UAC in that operation.

Chealer avatar May 05 '22 15:05 Chealer

If WinMerge fails to create a backup, it will display a message box similar to the one below. What message do you think is appropriate?

image

sdottaka avatar May 06 '22 02:05 sdottaka

Thank you @sdottaka Looking at this again, I notice that WinMerge 2.16.20.0 gives me the same error message as yours, and that message is in fact technically correct.

I believe I must have read the message too quickly. That being said, the message is clearly problematic in that it mentions the current path more prominently than the problematic path. I don't know if the message needs to mention the current path, but for sure, the most prominent path should be the path on which WinMerge is lacking permission.

Chealer avatar May 13 '22 21:05 Chealer

In commit 1b4fb4b, I changed it to also show the backup file path. I have made the message as follows so as not to affect translations, but if you think it is odd, please suggest an appropriate message.

image

sdottaka avatar May 21 '22 13:05 sdottaka

Arigato @sdottaka This is much clearer, but the problematic path remains less prominent than the other one.

I understand the unwillingness to lose existing translations, but the message could certainly get even clearer. In particular if the reason for failure was indicated. In the case of lacking permission, this could be:

Unable to backup original file (original path)

Permissions denied to create backuppath

In any case, I consider this issue is already mostly resolved. Feel free to treat this ticket as you wish.

Chealer avatar May 23 '22 15:05 Chealer

Thank you for your suggestion.

I will leave the message as is for now and will consider it again in the future when there are major revisions.

sdottaka avatar May 24 '22 13:05 sdottaka