You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2008/04/27 22:03:15 UTC
svn commit: r652009 -
/jakarta/jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java
Author: sebb
Date: Sun Apr 27 13:03:13 2008
New Revision: 652009
URL: http://svn.apache.org/viewvc?rev=652009&view=rev
Log:
// Ensure that directory URLs end in "/"
Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java?rev=652009&r1=652008&r2=652009&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java Sun Apr 27 13:03:13 2008
@@ -159,7 +159,14 @@
* @throws MalformedURLException
*/
public static void addPath(String path) throws MalformedURLException {
- URL url = new URL("file","",path);
+ File file = new File(path);
+ URL url;
+ // Ensure that directory URLs end in "/"
+ if (file.isDirectory() && !path.endsWith("/")) {// $NON-NLS-1$
+ url = new URL("file","",path+ "/");// $NON-NLS-1$
+ } else {
+ url = new URL("file","",path);
+ }
loader.addURL(url);
StringBuffer sb = new StringBuffer(System.getProperty(JAVA_CLASS_PATH));
sb.append(CLASSPATH_SEPARATOR);
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org