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

Directory browser cannot handle paths contain backslash on Linux

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Environment:
      Oracle Java 1.6 update 45
      Red Hat Enterprise Linux 6.4
    • Similar Issues:

      Description

      We had a faulty test case that saved screenshots from Selenium tests in a hard-coded location, which happened to be "C:\Screenshots". Unsurprisingly, this didn't work properly when run on our Linux build server. It created a directory called "C:\Screenshots" in the workspace, and then files like "C:\Screenshots\XXX.png" in the workspace directory.

      Obviously, we're fixing our build to not do this. However, Jenkins does not handle this case.

      You can recreate this by running the following commands in a workspace:

      [jenkins@build-master workspace]$ mkdir "C:\Screenshots"
      [jenkins@build-master workspace]$ echo test > "C:\Screenshots\test.txt"

      The output of ls -l will then contain entries like this:

      drwxrwxr-x. 2 jenkins jenkins 4096 Oct 17 14:46 C:\Screenshots
      rw-rw-r-. 1 jenkins jenkins 5 Oct 17 14:46 C:\Screenshots\test.txt

      Attempts to navigate into the folder or view the file through the workspace browser will fail with a 404 error. Additionally, the directory will appear as just Screenshots and the file as test.txt, rather than their full names.

      (Set priority to Trivial, as frankly, I don't expect this situation to come up again).

        Attachments

          Issue Links

            Activity

            Hide
            bin_ary Brian Artman added a comment -

            I'd like to give this a try. I'm pretty junior so if someone has a fix you can take over and I'll find something else to work on.

            Show
            bin_ary Brian Artman added a comment - I'd like to give this a try. I'm pretty junior so if someone has a fix you can take over and I'll find something else to work on.
            Hide
            danielbeck Daniel Beck added a comment -

            Also happens with files and folders named 'foo\bar\baz', they show up as 'baz'.

            Show
            danielbeck Daniel Beck added a comment - Also happens with files and folders named 'foo\bar\baz', they show up as 'baz'.

              People

              • Assignee:
                schristou Steven Christou
                Reporter:
                pmilliken Paul Milliken
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: