Open peterbrorsson opened 6 months ago
Thanks for the report! I haven't used SARIF Explorer on Windows, which is likely why this probably slipped through. I'll try to take a look at this soon. If you have a (non-confidential) SARIF file to reproduce the bug more easily, please share it. If not, I think I get there with your description as well.
I encounter the same problem. I get the message "Failed to open code region: SarifResultPathIsAbsolute: Result path is absolute but does not exist (/c:/wsl/sarif-test-960/Utilities.c). ..."
It seems the third "/" in "file:///" ends up in the path.
Example files attached.
It seems like a file uri reference like this:
file:///d:/sarif/demo.c
does not work. This is the correct format according to https://datatracker.ietf.org/doc/html/rfc8089 and is also exemplified in the SARIF documentation (https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html) (just 'find' C:)It seems like it works in this format:
file://d:/sarif/demo.c // missing slash
andfile://d:\\sarif\\demo.c // missing slash and host path separator