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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Unassigned
            Reporter:
            Joerg Schwaerzler
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: