X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/39189b90bd2f73d4f4938049ffa4441a967ca24c..38fcd08dda022d0167840fbb65222fe99b75fcf5:/sdk/cwl/arvados_cwl/fsaccess.py?ds=sidebyside diff --git a/sdk/cwl/arvados_cwl/fsaccess.py b/sdk/cwl/arvados_cwl/fsaccess.py index a99b2a7414..70aa69f669 100644 --- a/sdk/cwl/arvados_cwl/fsaccess.py +++ b/sdk/cwl/arvados_cwl/fsaccess.py @@ -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) @@ -151,6 +152,8 @@ class CollectionFetcher(DefaultFetcher): def check_exists(self, url): try: + if url.startswith("http://arvados.org/cwl"): + return True if url.startswith("keep:"): return self.fsaccess.exists(url) if url.startswith("arvwf:"):