Open timja opened 11 years ago
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.
Also happens with files and folders named 'foo\bar\baz', they show up as 'baz'.
[Originally related to: JENKINS-25224]
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.txtAttempts 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).
Originally reported by pmilliken, imported from: Directory browser cannot handle paths contain backslash on Linux