violations-plugin icon indicating copy to clipboard operation
violations-plugin copied to clipboard

Fixing 'no violations found' file links on Windows (Issue #50)

Open pfhorman opened this issue 8 years ago • 1 comments

This is the fix as described in issue 50. I ran across the issue on Jenkins running on Windows server. The problem is that all the file keys in the FileModelProxy use the file separator for the system (*nix='/', windows=''), but the String name here comes from getRestOfPath() which prefers the url forward slash (which doesn't work for the Windows keys). To transform the "rest of path" to the true file key, we must convert any '/' in the name to the File.separator for the system.

pfhorman avatar Dec 04 '15 20:12 pfhorman

I should mention this is only an issue if your files are located within subfolders and your Jenkins is running on Windows. I confirmed it was still an issue in the latest snapshot and this change fixes it.

pfhorman avatar Dec 04 '15 20:12 pfhorman