mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
Merge d114984124 into 54d6654ad1
This commit is contained in:
commit
be2b53f270
2 changed files with 21 additions and 5 deletions
|
|
@ -197,7 +197,10 @@ object frmSyncDirsDlg: TfrmSyncDirsDlg
|
|||
Width = 82
|
||||
Caption = 'asymmetric'
|
||||
Enabled = False
|
||||
Hint = 'One-way mirror: right panel becomes an exact copy of the left. Right-only files are deleted; right-newer files are overwritten by left.'
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object chkSubDirs: TCheckBox
|
||||
|
|
|
|||
|
|
@ -465,7 +465,12 @@ begin
|
|||
end;
|
||||
if R.FAction = srsUnknown then
|
||||
begin
|
||||
R.FAction := R.FState;
|
||||
// Mirror asymmetric logic from TFileSyncRec.Recalc:
|
||||
// in asymmetric mode srsNotEq means left wins → srsCopyRight.
|
||||
if chkAsymmetric.Checked and (R.FState = srsNotEq) then
|
||||
R.FAction := srsCopyRight
|
||||
else
|
||||
R.FAction := R.FState;
|
||||
end;
|
||||
except
|
||||
on E: Exception do
|
||||
|
|
@ -562,11 +567,19 @@ begin
|
|||
if FileTimeDiff < 0 then
|
||||
FState := srsCopyLeft;
|
||||
end;
|
||||
if FForm.chkAsymmetric.Checked and (FState = srsCopyLeft) then
|
||||
FAction := srsDoNothing
|
||||
else begin
|
||||
if FForm.chkAsymmetric.Checked then
|
||||
begin
|
||||
// In asymmetric/mirror mode left is unconditionally authoritative.
|
||||
// srsCopyLeft means right is newer — left still wins (overwrite right).
|
||||
// srsNotEq means ambiguous diff (e.g. content check) — left still wins.
|
||||
if FState in [srsCopyLeft, srsNotEq] then
|
||||
FAction := srsCopyRight
|
||||
else
|
||||
FAction := FState;
|
||||
end
|
||||
else
|
||||
FAction := FState;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TfrmSyncDirsDlg }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue