[Swift-commit] Cog update

swift at ci.uchicago.edu swift at ci.uchicago.edu
Mon Apr 30 18:35:03 CDT 2012


------------------------------------------------------------------------
r3394 | hategan | 2012-04-30 18:34:57 -0500 (Mon, 30 Apr 2012) | 1 line

allow pinning with file://
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/SubmitJobHandler.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/SubmitJobHandler.java	(revision 3393)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/SubmitJobHandler.java	(working copy)
@@ -206,18 +206,25 @@
 
     private String makeAbsolute(String path) {
         String prefix = "";
+        String spath;
         if (path.startsWith("pinned:")) {
             prefix = "pinned:";
-            path = path.substring(7);
+            spath = path.substring(7);
         }
-        if (path.startsWith("proxy://localhost")) {
+        else {
+            spath = path;
+        }
+        if (spath.startsWith("proxy://localhost")) {
             return prefix + "proxy://" + 
                    getChannel().getChannelContext().getChannelID() + 
-                   path.substring("proxy://localhost".length());
+                   spath.substring("proxy://localhost".length());
         }
-        else {
+        else if (spath.startsWith("file://localhost")) {
             return path;
         }
+        else {
+            return spath;
+        }
     }
 
     private String getKey(String s) throws ProtocolException {



More information about the Swift-commit mailing list