Skip to content

Commit befb1cc

Browse files
Fix integration tests for windows
1 parent e4edb19 commit befb1cc

File tree

1 file changed

+2
-1
lines changed
  • csharp/ql/lib/semmle/code/csharp/frameworks

1 file changed

+2
-1
lines changed

csharp/ql/lib/semmle/code/csharp/frameworks/Razor.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ private string getARazorPathPrefix() {
100100
or
101101
exists(File csproj |
102102
csproj.getExtension() = "csproj" and
103-
result = csproj.getParentContainer().getAbsolutePath()
103+
// possibly prepend '/' to match Windows absolute paths starting with `C:/` with paths appearing in the Razor file in standalone mode starting with `/C:/`
104+
result = ["/", ""] + csproj.getParentContainer().getAbsolutePath()
104105
)
105106
}
106107

0 commit comments

Comments
 (0)