mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Synchronize directories - ignore 3 second difference
This commit is contained in:
parent
fafb86b18b
commit
702ab7a310
1 changed files with 15 additions and 9 deletions
|
|
@ -287,6 +287,10 @@ begin
|
|||
end;
|
||||
|
||||
procedure TFileSyncRec.UpdateState(ignoreDate: Boolean);
|
||||
const
|
||||
TimeDiff = 3100 / MSecsPerDay;
|
||||
var
|
||||
FileTimeDiff: TDateTime;
|
||||
begin
|
||||
FState := srsNotEq;
|
||||
if Assigned(FFileR) and not Assigned(FFileL) then
|
||||
|
|
@ -294,16 +298,18 @@ begin
|
|||
else
|
||||
if not Assigned(FFileR) and Assigned(FFileL) then
|
||||
FState := srsCopyRight
|
||||
else
|
||||
if ((FFileL.ModificationTime = FFileR.ModificationTime) or ignoreDate) and (FFileL.Size = FFileR.Size) then
|
||||
FState := srsEqual
|
||||
else
|
||||
if not ignoreDate then
|
||||
if FFileR.ModificationTime < FFileL.ModificationTime then
|
||||
FState := srsCopyRight
|
||||
else begin
|
||||
FileTimeDiff := FFileL.ModificationTime - FFileR.ModificationTime;
|
||||
if (((FileTimeDiff > -TimeDiff) and (FileTimeDiff < TimeDiff)) or ignoreDate) and (FFileL.Size = FFileR.Size) then
|
||||
FState := srsEqual
|
||||
else
|
||||
if FFileR.ModificationTime > FFileL.ModificationTime then
|
||||
FState := srsCopyLeft;
|
||||
if not ignoreDate then
|
||||
if FFileR.ModificationTime < FFileL.ModificationTime then
|
||||
FState := srsCopyRight
|
||||
else
|
||||
if FFileR.ModificationTime > FFileL.ModificationTime then
|
||||
FState := srsCopyLeft;
|
||||
end;
|
||||
FAction := FState;
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue