Merge branch '11017-docker-migration'
[arvados.git] / sdk / cwl / arvados_cwl / fsaccess.py
index a99b2a74149db501049b4267e7292467e9bd4886..2191dcb8df712818cafc24f963f65b2a2a42b9d8 100644 (file)
@@ -30,13 +30,14 @@ class CollectionFsAccess(cwltool.stdfsaccess.StdFsAccess):
         self.collections = {}
 
     def get_collection(self, path):
-        p = path.split("/")
-        if p[0].startswith("keep:") and arvados.util.keep_locator_pattern.match(p[0][5:]):
-            pdh = p[0][5:]
+        sp = path.split("/", 1)
+        p = sp[0]
+        if p.startswith("keep:") and arvados.util.keep_locator_pattern.match(p[5:]):
+            pdh = p[5:]
             if pdh not in self.collections:
                 self.collections[pdh] = arvados.collection.CollectionReader(pdh, api_client=self.api_client,
                                                                             keep_client=self.keep_client)
-            return (self.collections[pdh], "/".join(p[1:]))
+            return (self.collections[pdh], sp[1] if len(sp) == 2 else None)
         else:
             return (None, path)