File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ func fileExists(path string) bool {
1818// Decides if `dirPath` is a vendor directory by testing whether it is called `vendor`
1919// and contains a `modules.txt` file.
2020func isGolangVendorDirectory (dirPath string ) bool {
21- return path .Base (dirPath ) == "vendor" && fileExists (path .Join (dirPath , "modules.txt" ))
21+ return filepath .Base (dirPath ) == "vendor" && fileExists (filepath .Join (dirPath , "modules.txt" ))
2222}
2323
2424type BaselineConfig struct {
@@ -38,7 +38,8 @@ func GetConfigBaselineAsJSON(rootDir string) ([]byte, error) {
3838 return nil
3939 }
4040 if isGolangVendorDirectory (dirPath ) {
41- vendorDirs = append (vendorDirs , path .Join (dirPath , "**" ))
41+ // Note that CodeQL expects a forward-slash-separated path, even on Windows.
42+ vendorDirs = append (vendorDirs , path .Join (filepath .ToSlash (dirPath ), "**" ))
4243 return filepath .SkipDir
4344 } else {
4445 return nil
You can’t perform that action at this time.
0 commit comments