Use filepath for proper multi-platform support (#4449)

This commit is contained in:
Lucas Manuel Rodriguez 2022-03-04 13:30:20 -03:00 committed by GitHub
parent 91474d89a3
commit aaf62a9e14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,6 @@ import (
"io/ioutil"
"net/url"
"os"
"path"
"path/filepath"
"runtime"
"strings"
@ -254,7 +253,7 @@ func main() {
var options []osquery.Option
options = append(options, osquery.WithDataPath(c.String("root-dir")))
options = append(options, osquery.WithLogPath(path.Join(c.String("root-dir"), "osquery_log")))
options = append(options, osquery.WithLogPath(filepath.Join(c.String("root-dir"), "osquery_log")))
if logFile != nil {
// If set, redirect osqueryd's stderr to the logFile.