From 4d9a2ca00282c7b8703560b9631bccda67990994 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Tue, 31 Oct 2006 13:29:57 +0000 Subject: [PATCH] Fix bug 162781 - Regex pattern matching in PathUtility --- .../org/eclipse/rse/services/clientserver/PathUtility.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 e6e9cda6ebe..797c38f5803 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 @@ -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)