X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1da448c49cb4ea4b8147e63f325102f793ca206c..08698803d8b324ba9a889a3aa41559d782bcc4bf:/sdk/cwl/arvados_cwl/arvcontainer.py?ds=sidebyside diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py index 19516d5b44..780ab89010 100644 --- a/sdk/cwl/arvados_cwl/arvcontainer.py +++ b/sdk/cwl/arvados_cwl/arvcontainer.py @@ -42,12 +42,22 @@ class ArvadosContainer(object): } } + dirs = set() for f in self.pathmapper.files(): - _, p, _ = self.pathmapper.mapper(f) - mounts[p] = { - "kind": "collection", - "portable_data_hash": p[6:] - } + _, p, tp = self.pathmapper.mapper(f) + if tp == "Directory" and '/' not in p[6:]: + mounts[p] = { + "kind": "collection", + "portable_data_hash": p[6:] + } + dirs.add(p[6:]) + for f in self.pathmapper.files(): + _, p, tp = self.pathmapper.mapper(f) + if p[6:].split("/")[0] not in dirs: + mounts[p] = { + "kind": "collection", + "portable_data_hash": p[6:] + } if self.generatefiles["listing"]: raise UnsupportedRequirement("Generate files not supported") @@ -90,7 +100,7 @@ class ArvadosContainer(object): self.arvrunner.processes[response["container_uuid"]] = self - logger.info("Container %s (%s) request state is %s", self.name, response["container_uuid"], response["state"]) + logger.info("Container %s (%s) request state is %s", self.name, response["uuid"], response["state"]) if response["state"] == "Final": self.done(response)