|
From: <caw...@us...> - 2007-07-19 16:22:09
|
Revision: 2800
http://svn.sourceforge.net/rubyeclipse/?rev=2800&view=rev
Author: cawilliams
Date: 2007-07-19 09:22:06 -0700 (Thu, 19 Jul 2007)
Log Message:
-----------
check vmInstallLocation to see if "bin" is in it already. If so, don't add "bin" in path to ri/rdoc/irb
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java 2007-07-19 16:19:59 UTC (rev 2799)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java 2007-07-19 16:22:06 UTC (rev 2800)
@@ -1670,7 +1670,11 @@
IVMInstall vm = RubyRuntime.getDefaultVMInstall();
if (vm == null) return null;
File installLocation = vm.getInstallLocation();
- String path = installLocation.getAbsolutePath() + File.separator + "bin" + File.separator + command;
+ String path = installLocation.getAbsolutePath();
+ if (!installLocation.getName().equals("bin")) {
+ path += File.separator + "bin";
+ }
+ path += File.separator + command;
if (Platform.getOS().equals(Platform.OS_WIN32)) {
path += ".bat";
}
@@ -1682,8 +1686,11 @@
String version = vm2.getRubyVersion();
if (version == null || version.length() < 3) return file;
version = version.substring(0, 3);
- path = installLocation.getAbsolutePath() + File.separator + "bin"
- + File.separator + command + version;
+ path = installLocation.getAbsolutePath();
+ if (!installLocation.getName().equals("bin")) {
+ path += File.separator + "bin";
+ }
+ path = File.separator + command + version;
if (Platform.getOS().equals(Platform.OS_WIN32)) {
path += ".bat";
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|