Return-Path: Delivered-To: apmail-xml-xalan-cvs-archive@xml.apache.org Received: (qmail 16606 invoked by uid 500); 14 Aug 2001 17:25:38 -0000 Mailing-List: contact xalan-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: Delivered-To: mailing list xalan-cvs@xml.apache.org Received: (qmail 16595 invoked from network); 14 Aug 2001 17:25:38 -0000 Date: 14 Aug 2001 17:22:08 -0000 Message-ID: <20010814172208.41026.qmail@icarus.apache.org> From: curcuru@apache.org To: xml-xalan-cvs@apache.org Subject: cvs commit: xml-xalan/test/java/src/org/apache/qetest Reporter.java X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N curcuru 01/08/14 10:22:08 Modified: test/java/src/org/apache/qetest Reporter.java Log: Use CanonicalPath/AbsolutePath to ensure writeResultsStatus will work even when using mixed-up directory separators (i.e. this now works when logFile=foo/bar.xml on Windows) Revision Changes Path 1.8 +15 -3 xml-xalan/test/java/src/org/apache/qetest/Reporter.java Index: Reporter.java =================================================================== RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/Reporter.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Reporter.java 2001/04/11 20:34:41 1.7 +++ Reporter.java 2001/08/14 17:22:08 1.8 @@ -64,6 +64,7 @@ import java.io.File; import java.io.FileWriter; +import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; @@ -92,7 +93,7 @@ * @todo explain better how results are rolled up and calculated * @author Shane_Curcuru@lotus.com * @author Jo_Grant@lotus.com - * @version $Id: Reporter.java,v 1.7 2001/04/11 20:34:41 curcuru Exp $ + * @version $Id: Reporter.java,v 1.8 2001/08/14 17:22:08 curcuru Exp $ */ public class Reporter implements Logger { @@ -1585,8 +1586,18 @@ // harnesses and build environments // Calculate the name relative to any logfile we have - String logFileBase = (new File(reporterProps.getProperty(OPT_LOGFILE, "ResultsSummary.xml"))).getParent(); - File summaryFile = new File("ResultsSummary.xml"); //@todo have better default + String logFileBase = null; + try + { + // CanonicalPath gives a better path, especially if + // you mix your path separators up + logFileBase = (new File(reporterProps.getProperty(OPT_LOGFILE, "ResultsSummary.xml"))).getCanonicalPath(); + } + catch (IOException ioe) + { + logFileBase = (new File(reporterProps.getProperty(OPT_LOGFILE, "ResultsSummary.xml"))).getAbsolutePath(); + } + logFileBase = (new File(logFileBase)).getParent(); File[] summaryFiles = { // Note array is ordered; should be re-designed so this doesn't matter @@ -1609,6 +1620,7 @@ summaryFiles[i].delete(); } + File summaryFile = null; switch (getCurrentFileResult()) { case INCP_RESULT: --------------------------------------------------------------------- To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: xalan-cvs-help@xml.apache.org