mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 20:35:38 +02:00
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 <patrick.tasse@gmail.com>
This commit is contained in:
parent
150b50ab79
commit
f1cf0e8c5c
1 changed files with 3 additions and 9 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue