jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1209012 - /jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
Date Thu, 01 Dec 2011 09:20:35 GMT
Author: pmouawad
Date: Thu Dec  1 09:20:34 2011
New Revision: 1209012

URL: http://svn.apache.org/viewvc?rev=1209012&view=rev
Log:
Rollback after discussion on dev list

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java?rev=1209012&r1=1209011&r2=1209012&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java Thu Dec  1 09:20:34
2011
@@ -389,10 +389,10 @@ public class ResultCollector extends Abs
             // Find the name of the directory containing the file
             // and create it - if there is one
             File pdir = new File(filename).getParentFile();
-            if (pdir != null && !pdir.exists()) {
-                boolean mkdirResult = pdir.mkdirs();
-                if (!mkdirResult){
-                    log.warn("Error creating directories for "+pdir.getAbsolutePath());
+            if (pdir != null) {
+                pdir.mkdirs();// returns false if directory already exists, so need to check
again
+                if (!pdir.exists()){
+                    log.warn("Error creating directories for "+pdir.toString());
                 }
             }
             writer = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new
FileOutputStream(filename,



Mime
View raw message