From f1cf0e8c5c6a66cc804e8e6d3e6f599beadcb50a Mon Sep 17 00:00:00 2001 From: Patrick Tasse Date: Wed, 14 Oct 2015 10:24:24 -0400 Subject: [PATCH] Bug 468889 - Fix RemoteServiceUtils.posixPath() for Kepler on Windows The fallback code was returning RemotePath(path) on Windows, which gives a path for the local file system, hence a Windows path, not a POSIX one. Change-Id: I220ffd7fbc7521fb28a5b1d0d41bf966131c035a Signed-off-by: Patrick Tasse --- .../org/eclipse/remote/core/RemoteServicesUtils.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/bundles/org.eclipse.remote.core/src/org/eclipse/remote/core/RemoteServicesUtils.java b/bundles/org.eclipse.remote.core/src/org/eclipse/remote/core/RemoteServicesUtils.java index 84138f0f504..0fc43fde6d1 100644 --- a/bundles/org.eclipse.remote.core/src/org/eclipse/remote/core/RemoteServicesUtils.java +++ b/bundles/org.eclipse.remote.core/src/org/eclipse/remote/core/RemoteServicesUtils.java @@ -40,19 +40,13 @@ public class RemoteServicesUtils { try { //Use the Mars implementation of Path, see bug 454959 return Path.forPosix(path); - } catch(NoSuchMethodError e) { + } catch (NoSuchMethodError e) { //TODO For older Eclipse, use the fallback below. That code should be //removed when support for Eclipse older than Mars is no longer needed. - } - /** Constant value indicating if the current platform is Windows */ - boolean RUNNING_ON_WINDOWS = java.io.File.separatorChar == '\\'; - if (! RUNNING_ON_WINDOWS) { - return new Path(path); - } else { - return new RemotePath(path); + return RemotePath.forPosix(path); } } - + /** * Convert a UNC path to a URI *