X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/10b3fe2ae3a37ee473684177aa6e4e9f090a230e..2c094e28cc4f19df4f6d0bc81355e7fc19e8c493:/sdk/cwl/arvados_cwl/arvcontainer.py diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py index 20601243b1..28107b491c 100644 --- a/sdk/cwl/arvados_cwl/arvcontainer.py +++ b/sdk/cwl/arvados_cwl/arvcontainer.py @@ -1,6 +1,7 @@ import logging import json import os +import urllib import ruamel.yaml as yaml @@ -63,14 +64,21 @@ class ArvadosContainer(object): for f in self.pathmapper.files(): res, p, tp = self.pathmapper.mapper(f) - pdh, path = res[5:].split("/", 1) + if res.startswith("keep:"): + res = res[5:] + elif res.startswith("/keep/"): + res = res[6:] + else: + continue + sp = res.split("/", 1) + pdh = sp[0] if pdh not in dirs: mounts[p] = { "kind": "collection", "portable_data_hash": pdh } - if path: - mounts[p]["path"] = path + if len(sp) == 2: + mounts[p]["path"] = urllib.unquote(sp[1]) with Perf(metrics, "generatefiles %s" % self.name): if self.generatefiles["listing"]: