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

dir('c:\\') causes NullPointerException on Windows

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins 2.60.3
      Pipeline 2.5
      Pipeline: Basic Steps: 2.6
    • Similar Issues:

      Description

      Today I tried to change the current working directory using some absolute path name on on of my windows build agents. Unfortunately it reports a NullPointerException instead
      I tried both

      dir('c:\\')

      as well as

      dir('c:/')

      .

      I tried as well the following - which won't give me a NullPointerException but still won't work:

      dir('c:')
      dir('//?/c:/')
      dir('\\\\?\\c:\\')
      

      Hoever if I use

      dir('\\')

      it works just fine.
      Unfortunately until now I don't see a possibility to change to a different drive using that approach.
      E.g. Jenkins workspace is located on d: while I want to change to a directory located on c: drive.

        Attachments

          Activity

          macdrega Joerg Schwaerzler created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              macdrega Joerg Schwaerzler
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: