Skip to content

Commit fb29e35

Browse files
authored
1 parent 6a5be47 commit fb29e35

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

cwltool/builder.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,14 @@ def _capture_files(f: CWLObjectType) -> CWLObjectType:
422422
found = False
423423

424424
if isinstance(sfname, str):
425-
sf_location = (
426-
cast(str, datum["location"])[
427-
0 : cast(str, datum["location"]).rindex("/") + 1
428-
]
429-
+ sfname
430-
)
425+
d_location = cast(str, datum["location"])
426+
if "/" in d_location:
427+
sf_location = (
428+
d_location[0 : d_location.rindex("/") + 1]
429+
+ sfname
430+
)
431+
else:
432+
sf_location = d_location + sfname
431433
sfbasename = sfname
432434
elif isinstance(sfname, MutableMapping):
433435
sf_location = sfname["location"]

0 commit comments

Comments
 (0)