1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 23:55:26 +02:00

Fix bug 162781 - Regex pattern matching in PathUtility

This commit is contained in:
Martin Oberhuber 2006-10-31 13:29:57 +00:00
parent 1b56b5d133
commit 4d9a2ca002

View file

@ -48,7 +48,8 @@ public class PathUtility
{
//TODO Improve performance by manually iterating over char array
//need to quote once for the string, then again for the regex
path = path.replaceAll("\\\\\\\\", "\\"); //$NON-NLS-1$ //$NON-NLS-2$
//Replace "\\" by "\": Regex matcher needs quoting twice in search, once in replacement
path = path.replaceAll("\\\\\\\\", "\\\\"); //$NON-NLS-1$ //$NON-NLS-2$
containsDoubleSlashes = (path.indexOf("\\\\") != -1); //$NON-NLS-1$
}
if (endsWithSlash)