mirror of
https://github.com/github/codeql.git
synced 2026-05-14 19:29:28 +02:00
Fix Windows path handling in diagnostic relativization
Canonicalize `current_dir()` to match canonicalized file paths (avoids `\\?\` prefix mismatch on Windows), and normalize backslashes to forward slashes in relative diagnostic paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -94,7 +94,7 @@ pub fn run(options: Options) -> std::io::Result<()> {
|
||||
node_types::read_node_types_str("erb", tree_sitter_embedded_template::NODE_TYPES)?;
|
||||
let lines: std::io::Result<Vec<String>> = std::io::BufReader::new(file_list).lines().collect();
|
||||
let lines = lines?;
|
||||
let source_root = std::env::current_dir().ok();
|
||||
let source_root = std::env::current_dir().ok().and_then(|d| d.canonicalize().ok());
|
||||
lines
|
||||
.par_iter()
|
||||
.try_for_each(|line| {
|
||||
|
||||
Reference in New Issue
Block a user