From b711393f191d328474021db6ec9e3a80ef589af5 Mon Sep 17 00:00:00 2001 From: Seth Levine Date: Fri, 6 Oct 2023 11:48:35 -0400 Subject: [PATCH] Do Not Eval Sym Links --- plugins/inputs/logfile/logfile.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/inputs/logfile/logfile.go b/plugins/inputs/logfile/logfile.go index 3dc0578b99..df708c9715 100644 --- a/plugins/inputs/logfile/logfile.go +++ b/plugins/inputs/logfile/logfile.go @@ -445,12 +445,12 @@ func generateLogStreamName(fileName string, streamName string) string { // Directory should be skipped. // This func is to determine whether the file is actually a directory or a symbolic link pointing to a directory func isDirectory(filename string) (bool, error) { - path, err := filepath.EvalSymlinks(filename) - if err != nil { - return false, err - } + //path, err := filepath.EvalSymlinks(filename) + //if err != nil { + // return false, err + //} - info, err := os.Stat(path) + info, err := os.Stat(filename) if err != nil { return false, err }