mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-09 10:05:24 +02:00
martin's patch for Bug 161844
This commit is contained in:
parent
12cbc6a5ef
commit
38cdf43eaa
1 changed files with 3 additions and 4 deletions
|
@ -42,13 +42,12 @@ public class PathUtility
|
||||||
containsDoubleSlashes = (path.indexOf("\\\\") != -1);
|
containsDoubleSlashes = (path.indexOf("\\\\") != -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DKM - replaceAll is causing exception
|
|
||||||
while (containsDoubleSlashes)
|
while (containsDoubleSlashes)
|
||||||
{
|
{
|
||||||
path = path.replaceAll("\\\\", "\\");
|
//need to quote once for the string, then again for the regex
|
||||||
|
path = path.replaceAll("\\\\\\\\", "\\");
|
||||||
containsDoubleSlashes = (path.indexOf("\\\\") != -1);
|
containsDoubleSlashes = (path.indexOf("\\\\") != -1);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
if (endsWithSlash)
|
if (endsWithSlash)
|
||||||
{
|
{
|
||||||
if (!(path.length() == 3)) path = path.substring(0, path.length() - 1);
|
if (!(path.length() == 3)) path = path.substring(0, path.length() - 1);
|
||||||
|
@ -72,7 +71,7 @@ public class PathUtility
|
||||||
|
|
||||||
if (containsBackSlash)
|
if (containsBackSlash)
|
||||||
{
|
{
|
||||||
path = path.replaceAll("\\", "/");
|
path = path.replace('\\', '/');
|
||||||
containsDoubleSlashes = (path.indexOf("//") != -1);
|
containsDoubleSlashes = (path.indexOf("//") != -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue