Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-163

cfexecute and arguments containing spaces (Linux)

    Details

      Description

      I'm trying to use the Linux 'file' command. <cfexecute name="file one.gif" variable="dummy" />

      This works except when the filename contains spaces.

      For example if I have a single file named "one two three.gif" and I want to run the file command on it...

      Double-quoting the filename...
      <cfexecute name="file ""one two three.gif""" variable="dummy" /> or <cfexecute name="file" arguments="""one two three.gif""" variable="dummy" />

      Railo passes three arguments...
      "one
      two
      three.gif"

      Backslash-escaping the spaces...
      <cfexecute name="file one\ two\ three.gif" variable="dummy" /> or <cfexecute name="file" arguments="one\ two\ three.gif" variable="dummy" />

      Railo passes three arguments...
      one\
      two\
      three.gif

      Single-quoting the filename...
      <cfexecute name="file 'one two three.gif'" variable="dummy" /> or <cfexecute name="file" arguments="'one two three.gif'" variable="dummy" />

      Railo passing three arguments...
      'one
      two
      three.gif'

      The same seems to be true when the argument is passed as an array.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                andycarmic Andy Carmichael
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: