WI-8243 File deployment: Sync: Compare by = Timestamp reports files uploaded from project to server as different

This commit is contained in:
Shaverdova Elena
2012-02-02 18:03:04 +04:00
parent 536832f507
commit 216edb996a
2 changed files with 2 additions and 1 deletions
@@ -38,6 +38,7 @@ public class DirDiffSettings {
public boolean showNewOnTarget = true;
public boolean showCompareModes = true;
public CompareMode compareMode = CompareMode.CONTENT;
public double compareTimestampAccuracy = 0;
public boolean showInFrame = true; // in dialog otherwise
@@ -162,7 +162,7 @@ public class DTree {
dtype = isEqual(src, trg) ? DType.EQUAL : DType.CHANGED;
break;
case TIMESTAMP:
dtype = src.getTimeStamp() == trg.getTimeStamp() ? DType.EQUAL : DType.CHANGED;
dtype = Math.abs(src.getTimeStamp() - trg.getTimeStamp()) <= settings.compareTimestampAccuracy ? DType.EQUAL : DType.CHANGED;
break;
}
}