continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1369856 - /continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
Date Mon, 06 Aug 2012 14:25:37 GMT
Author: brett
Date: Mon Aug  6 14:25:36 2012
New Revision: 1369856

URL: http://svn.apache.org/viewvc?rev=1369856&view=rev
Log:
only error when the directory really failed, not just existed already

Modified:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java?rev=1369856&r1=1369855&r2=1369856&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
Mon Aug  6 14:25:36 2012
@@ -85,9 +85,10 @@ public class CaptureScreenShotsListener
         int lNumber = stackTrace[index].getLineNumber();
         String lineNumber = Integer.toString( lNumber );
         String className = cName.substring( cName.lastIndexOf( '.' ) + 1 );
-        if ( !targetPath.mkdirs() )
+        if ( !targetPath.exists() && !targetPath.mkdirs() )
         {
             System.out.println( "Unable to create screenshots directory" );
+            return;
         }
         String fileBaseName = methodName + "_" + className + ".java_" + lineNumber + "-"
+ time;
         try



Mime
View raw message