Fix gosimple lint warning (#651)

Signed-off-by: Cosmin Cojocar <ccojocar@cloudbees.com>
This commit is contained in:
Cosmin Cojocar 2021-06-17 14:39:47 +02:00 committed by GitHub
parent 731d0d51ce
commit df10b65136
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -446,8 +446,6 @@ func ExcludedDirsRegExp(excludedDirs []string) []*regexp.Regexp {
// RootPath returns the absolute root path of a scan
func RootPath(root string) (string, error) {
if strings.HasSuffix(root, "...") {
root = root[0 : len(root)-3]
}
root = strings.TrimPrefix(root, "...")
return filepath.Abs(root)
}