Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core.tests/indexer/org/eclipse/cdt/core/indexer/tests/DependencyTests.java')
-rw-r--r--core/org.eclipse.cdt.core.tests/indexer/org/eclipse/cdt/core/indexer/tests/DependencyTests.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core.tests/indexer/org/eclipse/cdt/core/indexer/tests/DependencyTests.java b/core/org.eclipse.cdt.core.tests/indexer/org/eclipse/cdt/core/indexer/tests/DependencyTests.java
index 24900b25e8b..979fea6dfbe 100644
--- a/core/org.eclipse.cdt.core.tests/indexer/org/eclipse/cdt/core/indexer/tests/DependencyTests.java
+++ b/core/org.eclipse.cdt.core.tests/indexer/org/eclipse/cdt/core/indexer/tests/DependencyTests.java
@@ -587,7 +587,9 @@ import org.eclipse.core.runtime.Platform;
private String[] convertToLocalPath(String[] model) {
IPath defaultPath = Platform.getLocation();
String pathString = defaultPath.toOSString();
- if (pathString.charAt(pathString.length() - 1) == '\\')
+ char endChar = pathString.charAt(pathString.length() - 1);
+ if (endChar == '/' ||
+ endChar == '\\')
{
pathString = pathString.substring(0, pathString.length() - 1);
}

Back to the top