jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1520921 - /jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java
Date Sun, 08 Sep 2013 20:39:35 GMT
Author: pmouawad
Date: Sun Sep  8 20:39:35 2013
New Revision: 1520921

URL: http://svn.apache.org/r1520921
Log:
Test for existence before trying to delete (thanks sebb)

Modified:
    jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java?rev=1520921&r1=1520920&r2=1520921&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java Sun Sep  8 20:39:35
2013
@@ -118,7 +118,7 @@ public class KeyToolUtils {
     public static void generateProxyCA(File keystore, String password,  int validity) throws
IOException {
         keystore.delete(); // any existing entries will be invalidated anyway
         // not strictly needed
-        if(!new File(CACERT).delete()) {
+        if(new File(CACERT).exists() && !new File(CACERT).delete()) {
             // Noop as we accept not to be able to delete it
             log.warn("Could not delete file:"+new File(CACERT).getAbsolutePath()+", will
continue ignoring this");
         }



Mime
View raw message