This fixes the TestTraceOffsetting test.
On Windows, the temporary path can look like this:
java.io.tmpdir=C:\Users\MARC-A~1\AppData\Local\Temp\ Which is a "short
path". When used in comparison with full, canonical paths, it fails.
In the context of this bug, because the comparison failed, it ended up
creating a second trace for the same location then the test could not
find the proper editor because the title contained a '(2)'.
Change-Id: I41def2180ff910e25489415c9de513212d2f2ea2
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/62529
Reviewed-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
final IResource candidate = folder.findMember(name);
if (candidate != null) {
final IPath rawLocation = candidate.getRawLocation();
- final File file = rawLocation.toFile();
+ File file = rawLocation.toFile();
+ try {
+ file = traceFile.getCanonicalFile();
+ } catch (IOException e) {
+ /* just use original file path */
+ }
return !file.equals(traceFile);
}
return false;