Skip to content

Commit 5336cb7

Browse files
committed
Shared: Add trailing slash to driver letter TRAP IDs
1 parent 6273e8d commit 5336cb7

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

ql/Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shared/tree-sitter-extractor/src/file_paths.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ pub fn normalize_path(path: &Path) -> String {
3131
std::path::Component::ParentDir => {}
3232
}
3333
}
34+
if components.len() == 1 {
35+
// If the path is just a drive letter, we need to add a trailing
36+
// slash to match the CodeQL spec.
37+
components.push("".to_string());
38+
}
3439
components.join("/")
3540
} else {
3641
// For other operating systems, we can use the canonicalized path

0 commit comments

Comments
 (0)