From 38cdf43eaa6528c1661cf822ff9dff8f4a7a1a5a Mon Sep 17 00:00:00 2001 From: David McKnight Date: Tue, 24 Oct 2006 12:23:51 +0000 Subject: [PATCH] martin's patch for Bug 161844 --- .../org/eclipse/rse/services/clientserver/PathUtility.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java index 7d7ec6217ed..392dd14b385 100644 --- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java +++ b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java @@ -42,13 +42,12 @@ public class PathUtility containsDoubleSlashes = (path.indexOf("\\\\") != -1); } - /* DKM - replaceAll is causing exception while (containsDoubleSlashes) { - path = path.replaceAll("\\\\", "\\"); + //need to quote once for the string, then again for the regex + path = path.replaceAll("\\\\\\\\", "\\"); containsDoubleSlashes = (path.indexOf("\\\\") != -1); } - */ if (endsWithSlash) { if (!(path.length() == 3)) path = path.substring(0, path.length() - 1); @@ -72,7 +71,7 @@ public class PathUtility if (containsBackSlash) { - path = path.replaceAll("\\", "/"); + path = path.replace('\\', '/'); containsDoubleSlashes = (path.indexOf("//") != -1); }