Merge remote-tracking branch 'origin/master'

This commit is contained in:
Kirill Likhodedov
2012-02-02 18:15:32 +04:00
3 changed files with 11 additions and 2 deletions
@@ -58,7 +58,15 @@ public class CoreJarVirtualFile extends VirtualFile {
@Override
public String getPath() {
if (myParent == null) return myHandler.myBasePath + "!/";
return myParent.getPath() + "/" + myEntry.shortName;
String parentPath = myParent.getPath();
StringBuilder answer = new StringBuilder(parentPath.length() + 1 + myEntry.shortName.length());
if (answer.charAt(answer.length() - 1) != '/') {
answer.append('/');
}
answer.append(myEntry.shortName);
return answer.toString();
}
@Override
@@ -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;
}
}