Merge pull request #162 from ashwathishiva/fix_win_path_bug

textanalyze: fixes path handling in windows as well
This commit is contained in:
Marc Campbell
2020-03-26 16:07:05 -07:00
committed by GitHub

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)