mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 13:25:45 +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,16 +40,10 @@ public class RemoteServicesUtils {
|
||||||
try {
|
try {
|
||||||
//Use the Mars implementation of Path, see bug 454959
|
//Use the Mars implementation of Path, see bug 454959
|
||||||
return Path.forPosix(path);
|
return Path.forPosix(path);
|
||||||
} catch(NoSuchMethodError e) {
|
} catch (NoSuchMethodError e) {
|
||||||
//TODO For older Eclipse, use the fallback below. That code should be
|
//TODO For older Eclipse, use the fallback below. That code should be
|
||||||
//removed when support for Eclipse older than Mars is no longer needed.
|
//removed when support for Eclipse older than Mars is no longer needed.
|
||||||
}
|
return RemotePath.forPosix(path);
|
||||||
/** 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue