[Swift-commit] cog r3807

swift at ci.uchicago.edu swift at ci.uchicago.edu
Fri Oct 11 21:20:03 CDT 2013


------------------------------------------------------------------------
r3807 | hategan | 2013-10-11 21:19:11 -0500 (Fri, 11 Oct 2013) | 1 line

ensure that CA directory exists (when only the file lock was used it would create this directory, but after that was abandoned this stopped being the case). If the listing of files in the CA dir fails, throw an exception with a clear message instead of a NPE (see bug #1109)
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/AutoCA.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/AutoCA.java	(revision 3806)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/AutoCA.java	(working copy)
@@ -136,6 +136,9 @@
         
         try {
             File[] certs = discoverProxies();
+            if (certs == null) {
+                throw new IOException("Failed to list files in CA directory (" + CA_DIR + ")");
+            }
             long now = System.currentTimeMillis();
             long maxExpirationTime = 0;
             
@@ -213,6 +216,8 @@
     }
 
     private Object lockDir(String caDir) {
+        File caDirFile = new File(caDir);
+        caDirFile.mkdirs();
         if (SHARED_PROXIES) {
             FileLock fl = new FileLock(CA_DIR);
             try {



More information about the Swift-commit mailing list