curcuru 01/08/09 04:57:33
Modified: test/java/src/org/apache/qetest QetestUtils.java
Log:
Fix possible bug: when checking for leading slash, check the current tmp
name, not the original filename, so we always end up with 3 slashes;
this should result in better names on UNIX systems
Revision Changes Path
1.8 +5 -5
xml-xalan/test/java/src/org/apache/qetest/QetestUtils.java
Index: QetestUtils.java
===================================================================
RCS file:
/home/cvs/xml-xalan/test/java/src/org/apache/qetest/QetestUtils.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- QetestUtils.java 2001/06/28 13:17:04 1.7
+++ QetestUtils.java 2001/08/09 11:57:32 1.8
@@ -68,7 +68,7 @@
* line with a full or partial classname (in the org.apache.qetest
* area, obviously) and we'll load and execute that class instead.
* @author [EMAIL PROTECTED]
- * @version $Id: QetestUtils.java,v 1.7 2001/06/28 13:17:04 curcuru Exp $
+ * @version $Id: QetestUtils.java,v 1.8 2001/08/09 11:57:32 curcuru Exp $
*/
public abstract class QetestUtils
{
@@ -130,10 +130,10 @@
tmp = tmp.replace('\\', '/');
}
// Note the presumption that it's a file reference
- // Attempt to not add too many extra slashes on the
- // front if it already starts with a slash
- //@todo evaluate if this is really correct!
- if (filename.startsWith("/"))
+ // Ensure we have the correct number of slashes at the
+ // start: we always want 3 /// if it's absolute
+ // (which we should have forced above)
+ if (tmp.startsWith("/"))
return "file://" + tmp;
else
return "file:///" + tmp;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]