fix bug in testing code

This commit is contained in:
Grahame Grieve 2021-11-21 21:47:36 +11:00
parent e7a121728a
commit 412e4931fb
1 changed files with 7 additions and 6 deletions

View File

@ -151,13 +151,14 @@ public class TestingUtilities extends BaseTestingUtilities {
String result = compareXml(f1, f2);
if (result != null && SHOW_DIFF) {
String diff = Utilities.path(System.getenv("ProgramFiles"), "WinMerge", "WinMergeU.exe");
List<String> command = new ArrayList<String>();
command.add("\"" + diff + "\" \"" + f1 + "\" \"" + f2 + "\"");
ProcessBuilder builder = new ProcessBuilder(command);
builder.directory(new CSFile("c:\\temp"));
builder.start();
if (new File(diff).exists()) {
List<String> command = new ArrayList<String>();
command.add("\"" + diff + "\" \"" + f1 + "\" \"" + f2 + "\"");
ProcessBuilder builder = new ProcessBuilder(command);
builder.directory(new CSFile("c:\\temp"));
builder.start();
}
}
return result;
}