Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8864

CIFS copy fails if Share Name has spaces or slash ("/") characters

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • cifs-plugin
    • None
    • CIFS 1.1.13
      Windows XP SP3

      When inputting a Share Name with spaces or slashes in the name, the share URL replaces spaces with %20 and / with %2F and the CIFS copy fails. URL looks like:
      smb://domain;username@machine/Build%20Archive%2Fincoming%2F
      Expected URL would be:
      smb://domain;username@machine/Build Archive/incoming/

          [JENKINS-8864] CIFS copy fails if Share Name has spaces or slash ("/") characters

          Darth Vader created issue -
          Alex Earl made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Alex Earl added a comment -

          I assume the share is actually "Build Archive," if so, then you would want to put incoming as the destination to copy to in the job.

          Alex Earl added a comment - I assume the share is actually "Build Archive," if so, then you would want to put incoming as the destination to copy to in the job.

          Darth Vader added a comment -

          I tried with and without incoming but both fail.
          smb://domain;username@machine/Build%20Archive%2F
          also fails.
          It works only if I leave the Share Name blank and I put the share name in the destination path.

          Darth Vader added a comment - I tried with and without incoming but both fail. smb://domain;username@machine/Build%20Archive%2F also fails. It works only if I leave the Share Name blank and I put the share name in the destination path.

          Alex Earl added a comment -

          Why are you adding a trailing slash to the share name?

          Alex Earl added a comment - Why are you adding a trailing slash to the share name?

          Darth Vader added a comment -

          Trailing slash or not, it still doesn't work. The space in the Share Name is enough to make it fail.
          Also, we are trying to get parametrized share name for a standard destination to all our projects, such as smb://domain;username@machine/Build Archive/incoming/$JOB_NAME/$BUILD_NUMBER
          See HUDSON-8730

          Darth Vader added a comment - Trailing slash or not, it still doesn't work. The space in the Share Name is enough to make it fail. Also, we are trying to get parametrized share name for a standard destination to all our projects, such as smb://domain;username@machine/Build Archive/incoming/$JOB_NAME/$BUILD_NUMBER See HUDSON-8730

          Alex Earl added a comment -

          The share portion of the argument is the first part "Build Archive", the rest is a relative path to the root of that share, which should go in the destination field of the job configuration. I will try a share name with a space later.

          Alex Earl added a comment - The share portion of the argument is the first part "Build Archive", the rest is a relative path to the root of that share, which should go in the destination field of the job configuration. I will try a share name with a space later.

          Darth Vader added a comment -

          Our reasoning is that we would enter the parametrized share name once and then select it from the drop down menu when configuring a project which is much less error prone.
          I guess our request could also be to have standard destinations for a given share that would be configured in the global settings at the same time as the share. The share and the standard destinations would then be selected from drop down menus.

          Darth Vader added a comment - Our reasoning is that we would enter the parametrized share name once and then select it from the drop down menu when configuring a project which is much less error prone. I guess our request could also be to have standard destinations for a given share that would be configured in the global settings at the same time as the share. The share and the standard destinations would then be selected from drop down menus.

          Alex Earl added a comment -

          This is not currently how the plugin works. The share name entered on the global configuration page is THE share name, there should not be any additional path information. This is why slashes, et al, are getting escaped right now. Please open a separate request for the feature and I will debug the share name with space for this specific case.

          Alex Earl added a comment - This is not currently how the plugin works. The share name entered on the global configuration page is THE share name, there should not be any additional path information. This is why slashes, et al, are getting escaped right now. Please open a separate request for the feature and I will debug the share name with space for this specific case.

          Alex Earl added a comment -

          Found that only the domain, username and password need to be URL encoded. So, I removed the URL encoding on the rest of the URL. Slashes in share names may still not work, but you filed a new issue on that request for default shares with variables.

          Alex Earl added a comment - Found that only the domain, username and password need to be URL encoded. So, I removed the URL encoding on the rest of the URL. Slashes in share names may still not work, but you filed a new issue on that request for default shares with variables.
          Alex Earl made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

            slide_o_mix Alex Earl
            dvader Darth Vader
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: