Synchronizer: Avoid that, in several cases, the default action is to overwrite a file with an old version of it

Authored by asensi on Jan 24 2020, 12:23 AM.



For months now, every working day I have to synchronize files at least two times, using the helpful "asymmetric" mode of Synchronizer.

Sooner or later, the sides in Synchronizer are chosen wrongly (we are human after all), and so the default action is to overwrite files with their old versions (which leads to data loss). That's when the behavior of programs like Total Commander come handy, showing in that case that files are different, instead of offering the overwrite of the new file with the old version.

For example, before the new code is applied, the default action would overwrite the new version:

After the new code is applied, the default action does not overwrite the new version (although Krusader users have the option of overwriting the new version if they want to):

Note: I've been using this new code since October, and it has saved my files at least three times.

Test Plan

Synchronize several folders, with equal and different contents, trying different modes. For example: copy a folder, change some of its files so they are new versions of them, use the asymmetrical mode to test if Synchronizer offers to overwrite files with old versions of them.

Diff Detail

R167 Krusader
Lint Skipped
Unit Tests Skipped
asensi requested review of this revision.Jan 24 2020, 12:23 AM
asensi created this revision.

+1 Tested for several months without issues.

This revision was not accepted when it landed; it landed in state Needs Review.Sun, Mar 29, 9:24 PM
This revision was automatically updated to reflect the committed changes.

+1 Tested for several months without issues.

Same here :-), asymmetrical synchronizing has been very useful each day. Thanks, Yuri!