Output Filenames are URL Encoded

I am observing an issue where output filenames with special characters are URL encoded when copied from the tmp directory to the final output directory. For example, if a CommandLineTool writes a file whose name contains parenthesis, it will be written under the correct (non-encoded, i.e. “(parentheses).txt”) name in the tmp directory but this file will be relocated to the output directory under a URL encoded name, i.e. “%28parentheses%29.txt”

  • Under cwltool 3.0.2021031914372, this caused the runner to fail completely because it would search for the URL encoded filename in the tmp directory and fail to find it
  • Under cwltool 3.1.20210426140515, the runner is able to correctly identify the file in the tmp directory but relocates outputs under their URL encoded filenames

url_encode_test.cwl

class: CommandLineTool
cwlVersion: v1.0

baseCommand: touch

inputs:
    inp:
        type: string
        inputBinding:
            position: 0
outputs:
    out_file:
        type: File
        outputBinding:
            glob: $(inputs.inp)

job.json
{"inp": "(parentheses).txt"}

While this strikes me as a bug, I just thought I would check here first to make sure I’m not misusing the platform somehow. Thank you for your time and expertise!

edit: accidental double paste in url_encode_test.cwl

1 Like

Issue created. I’m going with my assumption that this is unintentional behavior.