Merge pull request #917 from suhasgumma/dev

Fixed: Wrong Relative Path When scanning Local Directory
This commit is contained in:
David Wertenteil
2022-11-27 16:24:19 +02:00
committed by GitHub
+3 -1
View File
@@ -103,6 +103,8 @@ func getResourcesFromPath(path string) (map[string]reporthandling.Source, []work
gitRepo, err := cautils.NewLocalGitRepository(path)
if err == nil && gitRepo != nil {
repoRoot, _ = gitRepo.GetRootDir()
} else {
repoRoot, _ = filepath.Abs(path)
}
// load resource from local file system
@@ -141,7 +143,7 @@ func getResourcesFromPath(path string) (map[string]reporthandling.Source, []work
}
workloadSource := reporthandling.Source{
RelativePath: source,
RelativePath: relSource,
FileType: filetype,
LastCommit: lastCommit,
}