X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/bd1378553152e98ffd0e9ecf68dc0f92ea3ff186..11eda09c7340da2c0a01259e3711758782c9b1c9:/sdk/cwl/arvados_cwl/pathmapper.py diff --git a/sdk/cwl/arvados_cwl/pathmapper.py b/sdk/cwl/arvados_cwl/pathmapper.py index 914ccaa5a1..bb95ba9ee4 100644 --- a/sdk/cwl/arvados_cwl/pathmapper.py +++ b/sdk/cwl/arvados_cwl/pathmapper.py @@ -230,7 +230,10 @@ class StagingPathMapper(PathMapper): tgt = "%s_%i%s" % (basetgt, n, baseext) self.targets.add(tgt) if obj["class"] == "Directory": - self._pathmap[loc] = MapperEnt(loc, tgt, "Directory", staged) + if obj.get("writable"): + self._pathmap[loc] = MapperEnt(loc, tgt, "WritableDirectory", staged) + else: + self._pathmap[loc] = MapperEnt(loc, tgt, "Directory", staged) if loc.startswith("_:") or self._follow_dirs: self.visitlisting(obj.get("listing", []), tgt, basedir) elif obj["class"] == "File": @@ -239,7 +242,7 @@ class StagingPathMapper(PathMapper): if "contents" in obj and loc.startswith("_:"): self._pathmap[loc] = MapperEnt(obj["contents"], tgt, "CreateFile", staged) else: - if copy: + if copy or obj.get("writable"): self._pathmap[loc] = MapperEnt(loc, tgt, "WritableFile", staged) else: self._pathmap[loc] = MapperEnt(loc, tgt, "File", staged)