fixes path handling in windows as well

This commit is contained in:
Ashwathi Shiva
2020-03-26 00:58:40 -04:00
parent c4f841d420
commit d1c45f1456

View File

@@ -1,7 +1,7 @@
package analyzer
import (
"path"
"path/filepath"
"regexp"
"strconv"
"strings"
@@ -11,7 +11,7 @@ import (
)
func analyzeTextAnalyze(analyzer *troubleshootv1beta1.TextAnalyze, getCollectedFileContents func(string) ([]byte, error)) (*AnalyzeResult, error) {
fullPath := path.Join(analyzer.CollectorName, analyzer.FileName)
fullPath := filepath.Join(analyzer.CollectorName, analyzer.FileName)
collected, err := getCollectedFileContents(fullPath)
if err != nil {
return nil, errors.Wrapf(err, "failed to read collected file name: %s", fullPath)