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:
parent
1b56b5d133
commit
4d9a2ca002
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue